コード例 #1
0
ファイル: MatchTypeTests.cs プロジェクト: jashelb90/DBConfirm
        public void MatchType_Validate_Decimal_MatchesType_NoError()
        {
            MatchType matchType = new MatchType(typeof(decimal));

            bool result = matchType.Validate(152m);

            Assert.AreEqual(true, result);
        }
コード例 #2
0
ファイル: MatchTypeTests.cs プロジェクト: jashelb90/DBConfirm
        public void MatchType_Validate_Decimal_DoesNotMatchType_Error()
        {
            MatchType matchType = new MatchType(typeof(int));

            bool result = matchType.Validate(1234.5m);

            Assert.AreEqual(false, result);
        }
コード例 #3
0
ファイル: MatchTypeTests.cs プロジェクト: jashelb90/DBConfirm
        public void MatchType_Validate_MatchesType_NoError(Type expectedType, object value)
        {
            MatchType matchType = new MatchType(expectedType);

            bool result = matchType.Validate(value);

            Assert.AreEqual(true, result);
        }
コード例 #4
0
ファイル: MatchTypeTests.cs プロジェクト: jashelb90/DBConfirm
        public void MatchType_Validate_DoesNotMatchType_Error(Type expectedType, object value)
        {
            MatchType matchType = new MatchType(expectedType);

            bool result = matchType.Validate(value);

            Assert.AreEqual(false, result);
        }