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 TestAdding1DaysOfSunshine() { SunshineMeasurement sm; sm = new SunshineMeasurement("Eindhoven"); sm.addSunshineOfLastDay(100); Assert.AreEqual("Eindhoven", sm.Cityname); Assert.AreEqual(100, sm.getAverageSunshine()); }