Ejemplo n.º 1
0
 public static void InheritanceTest()
 {
     DummyClasses.SonClass son = new DummyClasses.SonClass
     {
         PublicValue = 42,
     };
     son.SetPrivateValue(1337);
     son.SonValue = 50;
     DummyClasses.SonClass copy = son.Copy(true);
     AssertThat(copy.SonValue).IsEqualTo(50);
     AssertThat(copy.PublicValue).IsEqualTo(42);
     AssertThat(copy.GetPrivateValue()).IsEqualTo(1337);
 }
Ejemplo n.º 2
0
 public static void InheritanceTest()
 {
     DummyClasses.SonClass a = new DummyClasses.SonClass
     {
         PublicValue = 42,
     };
     a.SetPrivateValue(1337);
     a.SonValue = 50;
     DummyClasses.SonClass b = a.Copy(true);
     AssertThat(a.InternallyEquals(b, false)).IsTrue();
     AssertThat(a.InternallyEquals(b, true)).IsTrue();
     a.SetPrivateValue(22);
     AssertThat(a.InternallyEquals(b, false)).IsFalse();
     AssertThat(a.InternallyEquals(b, true)).IsFalse();
 }