public void TestMultipleBases () { var cls = new ClassWithNonVirtualBases (5, 3); Assert.AreEqual (5, cls.Number, "#1"); Assert.AreEqual (3, ((MultiplierClass)cls).Number, "#2"); cls.Add (4); Assert.AreEqual (9, cls.Number, "#3"); Assert.AreEqual (3, ((MultiplierClass)cls).Number, "#4"); cls.MultiplierClass.Multiply (10); Assert.AreEqual (9, cls.Number, "#5"); Assert.AreEqual (30, ((MultiplierClass)cls).Number, "#6"); }
public void TestMultipleBases() { var cls = new ClassWithNonVirtualBases(5, 3); Assert.AreEqual(5, cls.Number, "#1"); Assert.AreEqual(3, ((MultiplierClass)cls).Number, "#2"); cls.Add(4); Assert.AreEqual(9, cls.Number, "#3"); Assert.AreEqual(3, ((MultiplierClass)cls).Number, "#4"); cls.MultiplierClass.Multiply(10); Assert.AreEqual(9, cls.Number, "#5"); Assert.AreEqual(30, ((MultiplierClass)cls).Number, "#6"); }