I am an Idea that a test should have only one statement. However, it is sometimes difficult to decide whether I need to be strict on this or whether it depends.
Let's take an example, I have a client with an address. The address class has City-Street-PostCode-Country, etc. The properties
I would like to check if the address will be filled when creating the client.
Should I create one test for each property or many statements
Assert.That(customer.Address.City,Is.EqualTo("London")); Assert.That(customer.Address.Street, Is.EqualTo("StreetOne")); Assert.That(customer.Address.Postcode, Is.EqualTo("MyPostCode"));
What do you usually do when testing a method and it is important to know that the properties have been filled in as they go to the third party?
thanks for any suggestions
source share