示例#1
0
        public void NotMatchWithStringProperty()
        {
            var mi = typeof(Entity).GetProperty("Simple");
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.False();
        }
示例#2
0
        public void NotMatchWithCollectionField()
        {
            var mi = typeof(Entity).GetField("others", BindingFlags.NonPublic | BindingFlags.Instance);
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.False();
        }
示例#3
0
        public void MatchWithCollectionPropertyAndArrayField()
        {
            var mi = typeof(Entity).GetProperty("Emails");
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.True();
        }
示例#4
0
        public void MatchWithArrayField()
        {
            var mi = typeof(Entity).GetField("emails", BindingFlags.NonPublic | BindingFlags.Instance);
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.True();
        }
示例#5
0
        public void MatchWithArrayProperty()
        {
            var mi = typeof(Entity).GetProperty("NickNames");
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.True();
        }
示例#6
0
        public void NotMatchWithByteArrayProperty()
        {
            var mi = typeof(Entity).GetProperty("Photo");
            var p  = new ArrayCollectionPattern();

            p.Match(mi).Should().Be.False();
        }