public void TestReferenceConstraintPass1() { var constraint = new TypeConstraintReference(typeof(Component)); var collection = TypeUtilities.GetCollection(constraint); Assert.AreEqual(0, collection.Values.Count); }
public void TestReferenceConstraintPass3() { var constraint = new TypeConstraintReference(typeof(Interface1)); var collection = TypeUtilities.GetCollection(constraint); Assert.IsTrue(collection.Contains(typeof(ClassWithInterface1))); #pragma warning disable CS0612 Assert.IsFalse(collection.Contains(typeof(ClassWithInterface2))); #pragma warning restore CS0612 Assert.IsTrue(collection.Contains(typeof(ClassWithInterface3))); Assert.IsFalse(collection.Contains(typeof(Interface2))); Assert.IsFalse(collection.Contains(typeof(Interface3))); }