From 0306fbbdc00ce0cfea49a8531e1820cf584638a8 Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Fri, 21 Jul 2017 13:31:27 -0700 Subject: [PATCH] Fix broken unit tests --- .../Controllers/StatisticsControllerFacts.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/NuGetGallery.Facts/Controllers/StatisticsControllerFacts.cs b/tests/NuGetGallery.Facts/Controllers/StatisticsControllerFacts.cs index 2cdc8b4b8b..fe4f277944 100644 --- a/tests/NuGetGallery.Facts/Controllers/StatisticsControllerFacts.cs +++ b/tests/NuGetGallery.Facts/Controllers/StatisticsControllerFacts.cs @@ -628,7 +628,7 @@ public async Task Statistics_By_Client_Operation_ValidateReportStructureAndAvail public class TheTotalsAllAction { [Fact] - public async Task UseServerCultureIfLanguageHeadersIsMissing() + public async Task IgnoresServerCultureAndReturnsStatisticsAsNumbers() { // Arrange var currentCulture = CultureInfo.CurrentCulture; @@ -655,9 +655,9 @@ public async Task UseServerCultureIfLanguageHeadersIsMissing() Assert.NotNull(result); dynamic data = result.Data; - Assert.Equal("2,013", (string)data.Downloads); - Assert.Equal("500", (string)data.UniquePackages); - Assert.Equal("1,000", (string)data.TotalPackages); + Assert.Equal(2013, data.Downloads); + Assert.Equal(500, data.UniquePackages); + Assert.Equal(1000, data.TotalPackages); } finally { @@ -666,7 +666,7 @@ public async Task UseServerCultureIfLanguageHeadersIsMissing() } [Fact] - public async Task UseClientCultureIfLanguageHeadersIsPresent() + public async Task IgnoresUserCultureAndReturnsStatisticsAsNumbers() { // Arrange var aggregateStatsService = new Mock(MockBehavior.Strict); @@ -691,9 +691,9 @@ public async Task UseClientCultureIfLanguageHeadersIsPresent() Assert.NotNull(result); dynamic data = result.Data; - Assert.Equal("2.013", (string)data.Downloads); - Assert.Equal("500", (string)data.UniquePackages); - Assert.Equal("1.000", (string)data.TotalPackages); + Assert.Equal(2013, data.Downloads); + Assert.Equal(500, data.UniquePackages); + Assert.Equal(1000, data.TotalPackages); } ///