Beispiel #1
0
        public void AttributeExistsTest()
        {
            var c = new CClass1();
            var t = c.GetType();

            t.AttributeExists <Attribute1>().Should().BeTrue();
        }
Beispiel #2
0
        public void GetPropertiesTest()
        {
            var c = new CClass1();
            var t = c.GetType();

            t.GetProperties().Should().NotBeNull();
        }
        public void AttributeExistsTest()
        {
            var c        = new CClass1();
            var t        = c.GetType();
            var property = t.GetProperty("StringValue");

            property.AttributeExists <Attribute1>().Should().BeTrue();
        }
Beispiel #4
0
        public void GetPropertiesWithAttributeTest()
        {
            var c = new CClass1();
            var t = c.GetType();

            var results = t.GetPropertiesWithAttribute <Attribute1>(true);

            results.Should().NotBeNullOrEmpty();
            results.Should().HaveCountGreaterOrEqualTo(2);
        }
        public void GetAttributeOfTypeTest()
        {
            var c        = new CClass1();
            var t        = c.GetType();
            var property = t.GetProperty("StringValue");

            var results = property.GetAttributeOfType <Attribute1>(true);

            results.Should().NotBeNullOrEmpty();
            results.Should().HaveCountGreaterOrEqualTo(1);
        }