public void IncludeAbstractTypesTest()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.AbstractTypes;
            TypeSelector         selector = new TypeSelector(null, typeof(ITest), flags, treeView);
            bool valid = selector.IsTypeValid(typeof(AbstractTest));

            Assert.IsTrue(valid);
            valid = selector.IsTypeValid(typeof(ITest2));
            Assert.IsTrue(valid);
        }
Example #2
0
 public void FlagsTest()
 {
     TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.AbstractTypes |
         TypeSelectorIncludeFlags.Interfaces |
         TypeSelectorIncludeFlags.BaseType;
     TypeSelector selector = new TypeSelector(null, typeof(ITest), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(AbstractTest));
     Assert.IsTrue(valid);
     valid = selector.IsTypeValid(typeof(ITest));
     Assert.IsTrue(valid);
 }
Example #3
0
        public void FlagsTest()
        {
            TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.AbstractTypes |
                                             TypeSelectorIncludeFlags.Interfaces |
                                             TypeSelectorIncludeFlags.BaseType;
            TypeSelector selector = new TypeSelector(null, typeof(ITest), flags, treeView);
            bool         valid    = selector.IsTypeValid(typeof(AbstractTest));

            Assert.IsTrue(valid);
            valid = selector.IsTypeValid(typeof(ITest));
            Assert.IsTrue(valid);
        }
Example #4
0
 public void ExcludeAllInterfacesTest()
 {
     TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.Default;
     TypeSelector selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(IComparable));
     Assert.IsFalse(valid);
 }
Example #5
0
 public void ExcludeBaseTypeTest()
 {
     TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.Default;
     TypeSelector selector = new TypeSelector(null, typeof(Exception), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(Exception));
     Assert.IsFalse(valid);
 }
Example #6
0
 public void ExcludeNonPublicTypes()
 {
     TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.Default;
     TypeSelector selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(NonPublicClass));
     Assert.IsFalse(valid);
 }
Example #7
0
 public void ExcludeAbstractTypesTest()
 {
     TypeSelectorIncludeFlags flags = TypeSelectorIncludeFlags.Default;
     TypeSelector selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(Stream));
     Assert.IsFalse(valid);
 }
        public void IncludeNestedPublic()
        {
            TypeSelector selector = new TypeSelector(null, typeof(EventArgs), TypeSelectorIncludes.None, treeView);
            bool         valid    = selector.IsTypeValid(typeof(MockInnerTypeTest.InnerInner));

            Assert.IsTrue(valid);
        }
        public void ExcludeTypesWithoutConfigurationElementType()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, typeof(TestConfigurationElement), treeView);
            bool valid = selector.IsTypeValid(typeof(ITest));

            Assert.IsFalse(valid);
        }
        public void IncludeTypesWithConfigurationElementType()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(ITest), flags, typeof(TestConfigurationElement), treeView);
            bool valid = selector.IsTypeValid(typeof(TestWithConfigurationType));

            Assert.IsTrue(valid);
        }
        public void ExcludeAbstractTypesTest()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
            bool valid = selector.IsTypeValid(typeof(Stream));

            Assert.IsFalse(valid);
        }
        public void ExcludeAllInterfacesTest()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
            bool valid = selector.IsTypeValid(typeof(IComparable));

            Assert.IsFalse(valid);
        }
        public void ExcludeBaseTypeTest()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(Exception), flags, treeView);
            bool valid = selector.IsTypeValid(typeof(Exception));

            Assert.IsFalse(valid);
        }
        public void ExcludeNonPublicTypes()
        {
            TypeSelectorIncludes flags    = TypeSelectorIncludes.None;
            TypeSelector         selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
            bool valid = selector.IsTypeValid(typeof(NonPublicClass));

            Assert.IsFalse(valid);
        }
Example #15
0
 public void IncludeTypesWithConfigurationElementType()
 {
     TypeSelectorIncludes flags = TypeSelectorIncludes.None;
     TypeSelector selector = new TypeSelector(null, typeof(ITest), flags, typeof(TestConfigurationElement), treeView);
     bool valid = selector.IsTypeValid(typeof(TestWithConfigurationType));
     Assert.IsTrue(valid);
 }
Example #16
0
 public void IncludeNonPublicTypes()
 {
     TypeSelectorIncludes flags = TypeSelectorIncludes.NonpublicTypes;
     TypeSelector selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(NonPublicClass));
     Assert.IsTrue(valid);
 }
Example #17
0
 public void IncludeNestedPublic()
 {
     TypeSelector selector = new TypeSelector(null, typeof(EventArgs), TypeSelectorIncludes.None, treeView);
     bool valid = selector.IsTypeValid(typeof(MockInnerTypeTest.InnerInner));
     Assert.IsTrue(valid);
 }
Example #18
0
 public void IncludeBaseTypeTest()
 {
     TypeSelectorIncludes flags = TypeSelectorIncludes.BaseType;
     TypeSelector selector = new TypeSelector(null, typeof(Exception), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(Exception));
     Assert.IsTrue(valid);
 }
Example #19
0
 public void IncludeAbstractTypesTest()
 {
     TypeSelectorIncludes flags = TypeSelectorIncludes.AbstractTypes;
     TypeSelector selector = new TypeSelector(null, typeof(ITest), flags, treeView);
     bool valid = selector.IsTypeValid(typeof(AbstractTest));
     Assert.IsTrue(valid);
     valid = selector.IsTypeValid(typeof(ITest2));
     Assert.IsTrue(valid);
 }
Example #20
0
 public void ExcludeTypesWithoutConfigurationElementType()
 {
     TypeSelectorIncludes flags = TypeSelectorIncludes.None;
     TypeSelector selector = new TypeSelector(null, typeof(MarshalByRefObject), flags, typeof(TestConfigurationElement), treeView);
     bool valid = selector.IsTypeValid(typeof(ITest));
     Assert.IsFalse(valid);
 }