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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }