public void Should_not_have_duplicated_properties_for_interface_proxy_with_inherited_target_and_two_inherited_additional_interfaces() { var target = new HasPropertyBar(); object o = generator.CreateInterfaceProxyWithTarget(typeof(IHasProperty), new[] {typeof(IHasPropertyBar), typeof(IHasPropertyFoo)}, target, new StandardInterceptor()); PropertyInfo[] properties = o.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Assert.AreEqual(3, properties.Length); }
public void Should_not_have_duplicated_properties_for_interface_proxy_with_inherited_target_and_two_inherited_additional_interfaces() { var target = new HasPropertyBar(); object o = generator.CreateInterfaceProxyWithTarget(typeof(IHasProperty), new[] { typeof(IHasPropertyBar), typeof(IHasPropertyFoo) }, target, new StandardInterceptor()); PropertyInfo[] properties = o.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Assert.AreEqual(3, properties.Length); }