public void GivenGameWhenRegisterThenExpectedValue(string name, string acquisicionDate, int kind, string observation, bool expectedResult) { // Arrange var date = DateTime.Parse(acquisicionDate); var validator = new RegisterNewGameCommandValidation(); var gameCommand = new RegisterNewGameCommand { Name = name, AcquisicionDate = date, Kind = kind, Observation = observation }; // Act var result = validator.Validate(gameCommand); // Assert result.IsValid.Should().Be(expectedResult); }
public override bool IsValid() { ValidationResult = new RegisterNewGameCommandValidation().Validate(this); return(ValidationResult.IsValid); }