コード例 #1
0
        public void NoMatchWithOthersTypes()
        {
            var pattern = new PoidIntPattern();

            pattern.Match(TypeExtensions.DecodeMemberAccessExpression <MyClass>(m => m.StringProp)).Should().Be(false);
            pattern.Match(TypeExtensions.DecodeMemberAccessExpression <MyClass>(m => m.ObjectProp)).Should().Be(false);
        }
コード例 #2
0
        public void NoMatchWithNullMember()
        {
            var pattern = new PoidIntPattern();

            pattern.Match(null).Should().Be(false);
        }
コード例 #3
0
        public void MatchWithLongMember()
        {
            var pattern = new PoidIntPattern();

            pattern.Match(TypeExtensions.DecodeMemberAccessExpression <MyClass>(m => m.LongProp)).Should().Be(true);
        }
コード例 #4
0
 public void NoMatchWithOthersTypes()
 {
     var pattern = new PoidIntPattern();
     pattern.Match(TypeExtensions.DecodeMemberAccessExpression<MyClass>(m => m.StringProp)).Should().Be(false);
     pattern.Match(TypeExtensions.DecodeMemberAccessExpression<MyClass>(m => m.ObjectProp)).Should().Be(false);
 }
コード例 #5
0
 public void NoMatchWithNullMember()
 {
     var pattern = new PoidIntPattern();
     pattern.Match(null).Should().Be(false);
 }
コード例 #6
0
 public void MatchWithLongMember()
 {
     var pattern = new PoidIntPattern();
     pattern.Match(TypeExtensions.DecodeMemberAccessExpression<MyClass>(m => m.LongProp)).Should().Be(true);
 }