public void GetMemberInfo_InheritedMember_NewProperty_BaseStillAccessible() { var instance = new SpecificInterface(); const int number = 10; var info = (PropertyInfo)MemberExpressions.GetMemberInfo <IGeneralInterface>(c => c.Property1); Assert.AreEqual(typeof(IGeneralInterface), info.ReflectedType); Assert.AreEqual(typeof(object), info.PropertyType); info.SetValue(instance, number, null); Assert.AreEqual(number, instance.Property1); }
public GenericInterface(SpecificInterface specificInterface) { this.SpecificInterface = specificInterface; }
public UserBehavior(User user, SpecificInterface specificInterface) { this.Manager = new TinderManager(user); this.Interface = new GenericInterface(specificInterface); this.IsRunning = true; }