Example #1
0
        public void TestFieldStaticDeclaredOnly()
        {
            Flags flags = Flags.StaticAnyVisibility | Flags.DeclaredOnly;

            AnimalStaticFieldNames.Select(s => typeof(Animal).Field(s, flags)).ForEach(Assert.NotNull);
            AnimalStaticFieldNames.Select(s => typeof(Lion).Field(s, flags)).ForEach(Assert.Null);
        }
Example #2
0
        public void TestFieldStatic()
        {
            Flags flags = Flags.StaticAnyVisibility;

            AnimalInstanceFieldNames.Select(s => typeof(Animal).Field(s, flags)).ForEach(Assert.Null);

            AnimalStaticFieldNames.Select(s => typeof(Animal).Field(s, flags)).ForEach(Assert.NotNull);
            AnimalStaticFieldNames.Select(s => typeof(Lion).Field(s, flags)).ForEach(Assert.NotNull);
        }