Beispiel #1
0
        public void TestPropertyInstanceDeclaredOnly()
        {
            Flags flags = Flags.InstanceAnyVisibility | Flags.DeclaredOnly;

            AnimalInstancePropertyNames.Select(s => typeof(Animal).Property(s, flags)).ForEach(Assert.IsNotNull);
            LionDeclaredInstancePropertyNames.Select(s => typeof(Lion).Property(s, flags)).ForEach(Assert.IsNotNull);
        }
Beispiel #2
0
        public void TestPropertyInstance()
        {
            PropertyInfo property = typeof(object).Property("ID");

            Assert.IsNull(property);

            AnimalInstancePropertyNames.Select(s => typeof(Animal).Property(s)).ForEach(Assert.IsNotNull);
            LionInstancePropertyNames.Select(s => typeof(Lion).Property(s)).ForEach(Assert.IsNotNull);
        }
Beispiel #3
0
        public void TestPropertyStatic()
        {
            Flags flags = Flags.StaticAnyVisibility;

            AnimalInstancePropertyNames.Select(s => typeof(Animal).Property(s, flags)).ForEach(Assert.IsNull);

            AnimalStaticPropertyNames.Select(s => typeof(Animal).Property(s, flags)).ForEach(Assert.IsNotNull);
            AnimalStaticPropertyNames.Select(s => typeof(Lion).Property(s, flags)).ForEach(Assert.IsNotNull);
        }
Beispiel #4
0
        public void TestPropertyInstanceIgnoreCase()
        {
            Flags flags = Flags.InstanceAnyVisibility | Flags.IgnoreCase;

            AnimalInstancePropertyNames.Select(s => s.ToLower()).Select(s => typeof(Animal).Property(s)).ForEach(Assert.IsNull);
            AnimalInstancePropertyNames.Select(s => s.ToLower()).Select(s => typeof(Animal).Property(s, flags)).ForEach(Assert.IsNotNull);

            LionInstancePropertyNames.Select(s => s.ToLower()).Select(s => typeof(Lion).Property(s)).ForEach(Assert.IsNull);
            LionInstancePropertyNames.Select(s => s.ToLower()).Select(s => typeof(Lion).Property(s, flags)).ForEach(Assert.IsNotNull);
        }