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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }