public void Test_Add_A_List_Readings() { var readings = new List<double> { -5, -10, 0.23, 12.53, 17.05 }; ReadingsList readingsList = new ReadingsList(); readingsList.Add(readings); double reading = readingsList.GetReading(4); Assert.AreEqual(17.05, reading); }
public void Test_Minimum_Temperature_Of_The_Readings() { var readings = new List<double> { 10, 9.23, 12.53, 7.15, 17.05 }; ReadingsList readingsList = new ReadingsList(); readingsList.Add(readings); double minimumTemperature = readingsList.MinimumTemperature; Assert.AreEqual(7.15, minimumTemperature); }
public void Test_Average_Of_The_Readings() { var readings = new List<double> { 7.15, 10, 9.23, 12.53, 17.05 }; ReadingsList readingsList = new ReadingsList(); readingsList.Add(readings); double average = readingsList.AverageTemperature; Assert.AreEqual(11.192, average, 3); }
public void Test_Maximum_Temperature_Difference_Of_The_Readings() { var readings = new List<double> { 10, 9.23, 12.53, 7.15, 17.05 }; ReadingsList readingsList = new ReadingsList(); readingsList.Add(readings); double maximumTemperature = readingsList.MaximumDiference; Assert.AreEqual(9.9, maximumTemperature); }
public void Test_Add_New_Reading() { ReadingsList readingsList = new ReadingsList(); readingsList.Add(21.73); double reading = readingsList.GetReading(0); Assert.AreEqual(21.73, reading); }