public void Should_GetMinScoreOf1_When_GetSmallestPointSpreadIsRun() { // Arrange var report = new SoccerScoreReport <ILeagueScore>(MockedData.GetExpectedScores()); // Act var min = report.GetSmallestPointSpread(); // Assert Assert.AreEqual(1, min); }
public void Should_GetMaxSoccerSpreadOf43_When_GetLargestPointSpreadIsRun() { // Arrange var report = new SoccerScoreReport <ILeagueScore>(MockedData.GetExpectedScores()); // Act var max = report.GetLargestPointSpread(); // Assert Assert.AreEqual(43, max); }
public void Should_GetMinTemperatureOf2_When_GetSmallestTemperatureSpreadIsRun() { // Arrange var report = new WeatherReport <IDailyTemperature>(MockedData.GetExpectedTemperatures()); // Act var min = report.GetSmallestTemperatureSpread(); // Assert Assert.AreEqual(2, min); }
public void Should_GetMaxTemperatureOf54_When_GetLargestTemperatureSpreadIsRun() { // Arrange var report = new WeatherReport <IDailyTemperature>(MockedData.GetExpectedTemperatures()); // Act var max = report.GetLargestTemperatureSpread(); // Assert Assert.AreEqual(54, max); // 86 vs. 32 degrees in weather.dat }
public void Should_ImportFlatFileToModel_When_LayoutDescriptorIsDefined() { // Arrange if (!File.Exists(GetOriginalImportFilePath())) { throw new Exception("Import file does not exist!"); } var expected = MockedData.GetExpectedTemperatures(); // Act var importer = new WeatherImporter(GetOriginalImportFilePath()); var model = importer.GetWeatherReport(); // Assert CollectionAssert.AreEqual(model, expected); }