Example #1
0
        public void TestToyPlaneAbout()
        {
            //arrange
            t = new ToyPlane();

            //assert
            Assert.AreEqual(t.getWindUpString() + "\n" +
                            t.getEngineStartedString() + "\nThis " + t +
                            " has a max altitude of " + t.MaxAltitude + "\nIt's current altitude is " + t.CurrentAltitude, t.About());
        }
Example #2
0
        public void TestAirPlaneGetEngineString()
        {
            //Arrange
            tp = new ToyPlane();
            //Act
            string originalGetEngineString = tp.getEngineStartedString();

            tp.WindUp();
            tp.StartEngine();
            string engineTurnOnEngineString = tp.getEngineStartedString();

            tp.StopEngine();
            tp.UnWind();
            string engineTurnOffEngineString = tp.getEngineStartedString();

            //Assert
            Assert.AreEqual(originalGetEngineString, engineTurnOffEngineString);
            Assert.AreEqual("Engine is started", engineTurnOnEngineString);
            Assert.AreEqual("Engine not started", engineTurnOffEngineString);
        }