Beispiel #1
0
        public void MatchType_Validate_Decimal_MatchesType_NoError()
        {
            MatchType matchType = new MatchType(typeof(decimal));

            bool result = matchType.Validate(152m);

            Assert.AreEqual(true, result);
        }
Beispiel #2
0
        public void MatchType_Validate_Decimal_DoesNotMatchType_Error()
        {
            MatchType matchType = new MatchType(typeof(int));

            bool result = matchType.Validate(1234.5m);

            Assert.AreEqual(false, result);
        }
Beispiel #3
0
        public void MatchType_Validate_MatchesType_NoError(Type expectedType, object value)
        {
            MatchType matchType = new MatchType(expectedType);

            bool result = matchType.Validate(value);

            Assert.AreEqual(true, result);
        }
Beispiel #4
0
        public void MatchType_Validate_DoesNotMatchType_Error(Type expectedType, object value)
        {
            MatchType matchType = new MatchType(expectedType);

            bool result = matchType.Validate(value);

            Assert.AreEqual(false, result);
        }