예제 #1
0
        public void GetAllInterfacesWithObjectThatDoesntImpementAnything()
        {
            ImplementsNothing instance = new ImplementsNothing();

            Type[] interfaces = AopUtils.GetAllInterfaces(instance);
            Assert.IsNotNull(interfaces,
                             "Must never return null, even if the argument doesn't implement any interfaces.");
            Assert.AreEqual(0, interfaces.Length,
                            "Must return an empty array is the argument doesn't implement any interfaces.");
        }
예제 #2
0
 public void GetAllInterfacesWithObjectThatDoesntImpementAnything()
 {
     ImplementsNothing instance = new ImplementsNothing();
     Type[] interfaces = AopUtils.GetAllInterfaces(instance);
     Assert.IsNotNull(interfaces,
                      "Must never return null, even if the argument doesn't implement any interfaces.");
     Assert.AreEqual(0, interfaces.Length,
                     "Must return an empty array is the argument doesn't implement any interfaces.");
 }