Say I have a Service Layer method like this:
public void TestMethod()
{
DomainObject domainObject = new DomainObject();
domainObject.TestMethod();
}
TestMethod looks like this in the Domain Layer:
public void TestMethod()
{
TestMethod1();
TestMethod2();
TestMethod3();
}
Is it bad practice to Unit Test this Service Layer method? The reason I ask is because the Domain Object.TestMethod calls three other methods. My reading tells me that you should only test one method per unit test.
DomainObject.TestMethod
is implemented. The implementation in your domain layer is completely irrelevant to whether you should unit test your service layer. – Vincent Savard May 16 '17 at 17:08