public void TestNoMaximumSunshine() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); int bla = sm.getMaximumSunshine(); // Now an exception should be thrown since there are no sunshines added. }
public void TestAdding0DaysOfSunshine() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); int bla = sm.getAverageSunshine(); // Now an exception should be thrown since a division by zero must happen. }
public void TestConstructor() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); Assert.AreEqual("Eindhoven", sm.Cityname); }
public void TestAdding1MaximumSunshines() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); sm.addSunshineOfLastDay(100); Assert.AreEqual("Eindhoven", sm.Cityname); Assert.AreEqual(100, sm.getMaximumSunshine()); }
public void TestAdding2DaysOfSunshine() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); sm.addSunshineOfLastDay(100); sm.addSunshineOfLastDay(200); Assert.AreEqual("Eindhoven", sm.Cityname); Assert.AreEqual(150, sm.getAverageSunshine()); }