Ejemplo n.º 1
0
        public void IncompatiblePropertyTypeWillReceiveNotApplicableResult()
        {
            var instance = new IncompatibleTest {
                Value = 5
            };
            var result = this.provider.Validate(instance);

            result.Should().NotBeNull("because we should always get a result");
            result.IsApplicable.Should().BeFalse("because this is not a string property");
            result.IsSuccess.Should().BeFalse("because it could not be validated");
        }
        public void IncompatiblePropertyTypeWillReceiveNotApplicableResult()
        {
            var instance = new IncompatibleTest { Value = "" };
            var result = this.provider.Validate(instance);

            result.Should().NotBeNull("because we should always get a result");
            result.IsApplicable.Should().BeFalse("because this is not an integer property");
            result.IsSuccess.Should().BeFalse("because it could not be validated");
        }