// Tests if Sauna is turned oN public void Sauna_On() { //Arange Sauna testsauna = new Sauna(); //Act testsauna.saunaOn(); // Assert var result = testsauna.saunaStatus; Assert.IsTrue(result); }
// Tests if Sauna is turned oFF public void Sauna_TimerUP() { Sauna testsauna = new Sauna(); testsauna.setSaunaTemp(15); for (int i = 0; i < 10; i++) { testsauna.saunaOn(); } // Loop simulates Datetimer (f.ex in 10 seconds temp will increase with +5C , saunaOn method increases by 0.5) var result = testsauna.getSaunaTemp(); // method that returns temp of sauna Assert.AreEqual(20, result, "Sauna timer temp INCREMENT"); }