Пример #1
0
        // Tests if Sauna is turned oFF
        public void Sauna_Off()
        {
            //Arange
            Sauna testsauna = new Sauna();

            //Act
            testsauna.saunaOff(1); // this one requires parameter (double)
            // Assert
            var result = testsauna.saunaStatus;

            Assert.IsTrue(!result);
        }
Пример #2
0
        // Tests if Sauna is turned oFF
        public void Sauna_TimerDOWN()
        {
            Sauna testsauna = new Sauna();

            testsauna.setSaunaTemp(30);
            int roomTemp = 25; // Simulates room`s temp;

            for (int i = 0; i < 10; i++)
            {
                testsauna.saunaOff(roomTemp);
            }
            // Loop simulates Datetimer , saunaOff decrements by -1 , if its equal to room temp it doesnt drecrement more )

            var result = testsauna.getSaunaTemp(); // method that returns temp of sauna

            Assert.AreEqual(25, result, "Sauna timer temp DECREMENT");
        }