Assert is the wrong word for tests

Consider the following pseudocode test: assert person.getAdress is not null A slightly better test would like something like this: address1 = new Address assert address.getZipCode is null address2 = person.getAddress assert address2.getZipCode is not null We don't want our test to fail if there's something wrong with a constructor or simple composition. "Assert" is a … Continue reading Assert is the wrong word for tests

Advertisement