public void Assignment1_TestDerivedClassPants_ReturnTrue() { bool myresult = false; Pants pants = new Pants(92321344, "pants", "short pants", 1234); if (pants.GetType() == typeof(Pants)) { myresult = true; } Assert.IsTrue(myresult, "My short pants is of type pants."); }
public void Assignment1_IsPolyMorphic_ReturnTrue() { bool myresult = false; Pants pants = new Pants(1234, "jeans", "skinny jeans", 12); if (pants.GetType().IsSubclassOf(typeof(Clothing))) { myresult = true; } Assert.IsTrue(myresult, "Pants of type Pants and Clothing"); }
public string WhatIsYourClothToday() { return($"my cloth today is red {_shirts.GetType().Name} and blue {_pants.GetType().Name}"); }