public void StartEngineTest() { // ToyPlane toy = new ToyPlane(); toy.StartEngine(); Assert.AreEqual(toy.Engine.isStarted, false); // toy.windUp(); toy.StartEngine(); Assert.AreEqual(toy.Engine.isStarted, true); }
public void WindUpTest() { ToyPlane toy = new ToyPlane(); //isWoundUp = false string isWoundUpString = toy.getWindUpString(); Assert.AreEqual(isWoundUpString, $"{toy} is not wound up."); //isWoundUp = true; toy.windUp(); isWoundUpString = toy.getWindUpString(); Assert.AreEqual(isWoundUpString, $"{toy} is wound up."); }
public void TakeOffTest() { // ToyPlane toy = new ToyPlane(); string TakeOffString = toy.TakeOff(); Assert.AreEqual(TakeOffString, "You need to start the engine!"); // toy.windUp(); toy.StartEngine(); toy.TakeOff(); TakeOffString = toy.TakeOff(); Assert.AreEqual(TakeOffString, "You are flying"); // }