public void ShouldHaveErrors_Name_IsEmpty() { var validator = new EditOrderValidator(); var customer = new CustomerVM() { Name = " ", Adress = new AdressVm() }; var command = CommandFactory.EditOrder(1, true, true, customer); validator.ShouldHaveValidationErrorFor(c => c.Customer.Name, command); }
public void ShouldNotHaveErrors_Country_IsSet() { var validator = new EditOrderValidator(); var customer = new CustomerVM() { Name = " ", Adress = new AdressVm() { Country = "Test Country" } }; var command = CommandFactory.EditOrder(1, true, true, customer); validator.ShouldNotHaveValidationErrorFor(c => c.Customer.Adress.Country, command); }