public void ClassMethodsCanDefineDifferentAccess() { var Joker = new Megalomaniac(); // Uncomment the next line and make the assert pass: // Joker.MakePlan("Destroy Batman"); Assert.AreEqual("Destroy Batman", Joker.Mission); }
public void ClassMethodsCanDefineDifferentAccess() { var Joker = new Megalomaniac(); // Uncomment the next line and make the asert pass: // Joker.MakePlan("Destroy Batman"); Assert.AreEqual("Destroy Batman", Joker.Mission); }
public void PublicMethodsCanChangeObjectState() { var Joker = new Megalomaniac(); // Uncomment the next line and make the asert pass: // Joker.MakePlan("Destroy Batman"); Assert.AreEqual("Destroy Batman", Joker.Mission); Assert.AreEqual("Steal the batmobile", Joker.RetrieveNextStepOfPlan()); }
public void ClassTypesAreCopiedByReference() { var TheBrain = new Megalomaniac { Name = "The Brain", Henchman = "Pinky", Mission = "Try to take over the world." }; var AnotherBrain = TheBrain; AnotherBrain.Mission = "The same thing we do every night"; Assert.AreEqual(FILL_ME_IN, AnotherBrain.Mission); }
public void ClassTypesAreCopiedByReference() { var TheBrain = new Megalomaniac { Name = "The Brain", Henchman = "Pinky", Mission = "Try to take over the world." }; var AnotherBrain = TheBrain; AnotherBrain.Mission = "The same thing we do every night"; Assert.AreEqual("[__object__]", AnotherBrain.Mission); }
public void ClassesCanMaintainInternalState() { var Joker = new Megalomaniac(); // Uncomment the next line and make the asert pass: // Joker.MakePlan("Destroy Batman"); Assert.AreEqual("Destroy Batman", Joker.Mission); Assert.AreEqual("Steal the batmobile", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Drive batmobile to Central Park", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Cause accident involving catwoman", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Escape from Central Park", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Convince Batman he harmed Catwoman", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Get Batman to reveal his secret identity", Joker.RetrieveNextStepOfPlan()); Assert.AreEqual("Put Bruce Wayne in Jail", Joker.RetrieveNextStepOfPlan()); }