public void ToyPlaneUnwind() { //Arrange test = new ToyPlane(); //Act test.WindUp(); string beforeUnwind = test.getWindUpString(); test.Unwind(); string afterUnwind = test.getWindUpString(); //Assert Assert.AreEqual(beforeUnwind, $"{test.ToString()} string is wound up."); Assert.AreEqual(afterUnwind, $"{test.ToString()} string is not wound up."); }
public void ToyPlaneUnwindCheck() { //arrange ToyPlane tp = new ToyPlane(); //act - Engine on tp.WindUp(); tp.Engine.Start(); tp.TakeOff(); tp.Unwind(); //assert - check if unwound Assert.IsFalse(tp.isWoundUp); //assert - make sure we aren't flying Assert.IsFalse(tp.IsFlying); //assert - are we grounded? Assert.AreEqual(tp.CurrentAltitude, 0); }