DEV Community

Matheus Rodrigues
Matheus Rodrigues

Posted on • Originally published at on

SUT Factory

SUT factory may be a fancy name to what is basically a utility method, used to create an instance of the system under test. The main point of a SUT Factory is to reduce code duplication and improve maintainability of your unit tests suite.

I’ll show you a quick example of how can you implement this type of utility method.

Imagine a test like this one:

public void TestUsingConstructor()
    MySUT sut = new MySUT();

    //...Exercise the sut

    //...Verifying the results

Continue Reading...

Top comments (0)