public void should_access_public_memeber_in_derived_class() { var demoClass = new InheritMemberAccessDemoClass(); // please change the variable value to fix the test. const string expected = "Public Property Value"; Assert.Equal(expected, demoClass.PublicProperty); }
public void should_access_protected_member_in_derived_class() { var demoClass = new InheritMemberAccessDemoClass(); string actualValue = demoClass.ManipulateProtectedMember(); // please change the variable value to fix the test. const string expected = "The value is Protected Property Value"; Assert.Equal(expected, actualValue); }
public void should_get_most_derived_type_when_call_get_type_method() { var derivedClassObject = new InheritMemberAccessDemoClass(); var castedToBaseClass = (InheritMemberAccessDemoBaseClass)derivedClassObject; Type type = castedToBaseClass.GetType(); // change the variable value to fix the test. Type expectedType = typeof(InheritMemberAccessDemoBaseClass); Assert.Equal(expectedType, type); }