public void Validate_WhenCustomerIsValid_NothingHappens() { //arrange var customer = new CustomerForTestsBuilder().Build(); //act customer.Validate(); //assert nothing }
public void Validate_WhenAddressIsNull_ThrowsInvalidCustomerException() { //arrange var customer = new CustomerForTestsBuilder().WithoutAddress().Build(); //act var exception = Record.Exception(() => customer.Validate()); //assert Assert.IsType <CustomerInvalidException>(exception); }