public void GetAllInterfacesSunnyDay() { ImplementsTwoInterfaces instance = new ImplementsTwoInterfaces(); Type[] interfaces = AopUtils.GetAllInterfaces(instance); Assert.IsNotNull(interfaces, "Must never return null."); Assert.AreEqual(2, interfaces.Length, "Implements two interfaces."); ISet ifaces = new ListSet(interfaces); Assert.IsTrue( ifaces.ContainsAll( new Type [] { typeof(IDisposable), typeof(ICloneable) }), "Did not find the correct interfaces."); }
public void GetAllInterfacesSunnyDay() { ImplementsTwoInterfaces instance = new ImplementsTwoInterfaces(); Type[] interfaces = AopUtils.GetAllInterfaces(instance); Assert.IsNotNull(interfaces, "Must never return null."); Assert.AreEqual(2, interfaces.Length, "Implements two interfaces."); ISet ifaces = new ListSet(interfaces); Assert.IsTrue( ifaces.ContainsAll( new Type [] {typeof(IDisposable), typeof(ICloneable)}), "Did not find the correct interfaces."); }