Everyday Unit Testing

  • Home
  • Courses and Workshops
    • Unit Testing and TDD
      • Introduction
      • TDD Deep Dive
    • Clean Code
      • Clean Code
      • Clean Tests
    • Microservices and APIs
      • API Automation Testing for developers
      • API Testing With Postman for Testers
      • API Testing With Spring
      • Introduction to Microservices Architecture (NEW!)
      • Exploratory API Testing with Postman
    • BDD
      • Introduction
      • Deep Dive
    • Mobile Developer Testing
      • Introduction to Testing with React Native
    • Agile
      • Agile Estimation and Planning
  • Events
    • Upcoming Events
    • Next Webinar – How To Design Effective API Tests
    • Past Events
  • My Books
    • Everyday Unit Testing
    • Everyday Spring Testing
  • Blog
  • About Gil Zilberfeld
  • Contact
    • Contact
    • Mailing list registration

Refactoring

Legacy Code to Testable Code #8: Convert If-Else’s to Guard Blocks

I know, you want to check out the rest of the series. Here are the links: Code simplification is one of the best things we can do for ourselves. If we understand the code, not only will we write simpler tests, we will make less mistakes. Problem is, we’re now Read more…

By Gil Zilberfeld, 8 yearsSeptember 25, 2015 ago

Legacy Code To Testable Code #7: Introduce Parameter

You didn’t think we’ve covered everything, did you? Here’s a short reminder of what we got through: Today we’re going to talk about the Introduce Parameter refactoring pattern. This is one of the more useful patterns to clear code from dependencies. Here’s a method we’d like to test: public int Calculate(int x, Read more…

By Gil Zilberfeld, 8 yearsSeptember 18, 2015 ago
Gil Zilberfeld's Everyday Unit Testing book

New Release: V0.05 With Pre-Test Refactorings

I know it’s been a while, but the Everyday unit testing book is not going away! I’ll try to pick up speed, while you can give me feedback on v.05 of the “Everyday Unit Testing” book. Here’s what’s new in this increment: I’ve added a new section under “Writing tests” Read more…

By Gil Zilberfeld, 8 yearsFebruary 8, 2015 ago
Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #6: Add Overload

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts include:   In the last post, I’ve talked about Extract Class refactoring pattern, Read more…

By Gil Zilberfeld, 8 yearsOctober 28, 2014 ago
Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #5: Extract Class

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. Other posts include: A few years ago I got this from Erik Talboom: “A private Read more…

By Gil Zilberfeld, 8 yearsOctober 24, 2014 ago
Gil Zilberfeld points to one of the refactoring patterns in unit testing and unit tests that makes legacy code more testable.

Legacy Code to Testable Code #4: More Accessors!

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing unit tests for legacy code, and how they make our life easier. It continues the last post on accessors. Other posts include:   We talked about refactoring Read more…

By Gil Zilberfeld, 8 yearsOctober 20, 2014 ago
Gil Zilberfeld introduces a series of posts on refactoring patterns to be used in legacy code, to make it easier for writing unit tests.

Legacy Code To Testable Code: Introduction

The word “legacy” has a lot of connotations. Mostly bad ones. We seem to forget that our beautiful code gets to “legacy code“ status three days after writing it. Michael Feathers, in his wonderful book “Working Effectively With Legacy Code” defined legacy code as code that doesn’t have tests, and Read more…

By Gil Zilberfeld, 9 yearsSeptember 29, 2014 ago

Posts navigation

Previous 1 2

The Next Webinar:

How To Design Effective API Tests

April 4th, 2023, 5PM CET

Details
  • Home
  • Courses and Workshops
  • Events
  • My Books
  • Blog
  • About Gil Zilberfeld
  • Contact
Hestia | Developed by ThemeIsle