public void IsValid_ShouldBeFalse_WhenRequiredFieldsAreNotSet() { var command = new CreateUsaStateCommand(); var validator = new CreateUsaStateCommandValidator(Context); var result = validator.Validate(command); result.IsValid.ShouldBe(false); }
public void IsValid_ShouldBeTrue_WhenRequiredFieldsAreSet() { var command = new CreateUsaStateCommand { Name = "Test Name", AbbreviatedName = "Test AbbreviatedName" }; var validator = new CreateUsaStateCommandValidator(Context); var result = validator.Validate(command); result.IsValid.ShouldBe(true); }