public void IntIsValid() { var model = new IntModel() { Value = 5 }; ExtendedValidator.EnsureIsValid(model); }
public void IntIsNotValid() { var model = new IntModel() { Value = default(int) }; Assert.Throws <AggregateValidationException>(() => ExtendedValidator.EnsureIsValid(model)); }
public void Extract_Int_ShouldMapFromInt(int value) { // Arrange int intValue = value; RfcErrorInfo errorInfo; _interopMock.Setup(x => x.GetInt(DataHandle, "INTVALUE", out intValue, out errorInfo)); // Act IntModel result = OutputMapper.Extract <IntModel>(_interopMock.Object, DataHandle); // Assert result.Should().NotBeNull(); result.IntValue.Should().Be(intValue); }
public void IntIsNotValid() { var model = new IntModel() { Value = default(int) }; Assert.Throws<AggregateValidationException>(() => ExtendedValidator.EnsureIsValid(model)); }