diff --git a/src/Universalis.Application.Tests/Controllers/V1/CurrentlyShownControllerTests.cs b/src/Universalis.Application.Tests/Controllers/V1/CurrentlyShownControllerTests.cs index 5222c734..0351bdad 100644 --- a/src/Universalis.Application.Tests/Controllers/V1/CurrentlyShownControllerTests.cs +++ b/src/Universalis.Application.Tests/Controllers/V1/CurrentlyShownControllerTests.cs @@ -43,7 +43,7 @@ public static TestResources Create() } } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("74")] [InlineData("Coeurl")] [InlineData("coEUrl")] @@ -112,7 +112,7 @@ public async Task Controller_Get_ReturnsOne_WithEntries(string worldOrDc) Assert.True(currentlyShown.Listings.Count > 1); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("74")] [InlineData("Coeurl")] [InlineData("coEUrl")] @@ -147,7 +147,7 @@ public async Task Controller_Get_Succeeds_MultiItem_World(string worldOrDc) AssertCurrentlyShownValidWorld(document2, sales2, currentlyShown.Items.First(item => item.ItemId == document2.ItemId), test.GameData); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_SingleItem_DataCenter(string worldOrDc) @@ -187,7 +187,7 @@ public async Task Controller_Get_Succeeds_SingleItem_DataCenter(string worldOrDc worldOrDc); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_SingleItem_DataCenter_When_CurrentlyShownStore_Fails(string worldOrDc) @@ -223,7 +223,7 @@ public async Task Controller_Get_Succeeds_SingleItem_DataCenter_When_CurrentlySh worldOrDc); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_SingleItem_DataCenter_When_History_Fails(string worldOrDc) @@ -259,7 +259,7 @@ public async Task Controller_Get_Succeeds_SingleItem_DataCenter_When_History_Fai worldOrDc); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_MultiItem_DataCenter(string worldOrDc) @@ -473,7 +473,7 @@ public async Task Controller_Get_Succeeds_MultiItem_DataCenter_WhenNotMarketable Assert.Null(history.WorldId); } - [Fact(Skip = "Testing without history")] + [Fact] public async Task Controller_Get_Succeeds_SingleItem_Fields() { var test = TestResources.Create(); diff --git a/src/Universalis.Application.Tests/Controllers/V2/CurrentlyShownControllerTests.cs b/src/Universalis.Application.Tests/Controllers/V2/CurrentlyShownControllerTests.cs index 9e0a7121..231db672 100644 --- a/src/Universalis.Application.Tests/Controllers/V2/CurrentlyShownControllerTests.cs +++ b/src/Universalis.Application.Tests/Controllers/V2/CurrentlyShownControllerTests.cs @@ -45,7 +45,7 @@ public static TestResources Create() } } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("74")] [InlineData("Coeurl")] [InlineData("coEUrl")] @@ -66,7 +66,7 @@ public async Task Controller_Get_Succeeds_SingleItem_World(string worldOrDc) AssertCurrentlyShownValidWorld(document, sales, currentlyShown, test.GameData); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("74")] [InlineData("Coeurl")] [InlineData("coEUrl")] @@ -103,7 +103,7 @@ public async Task Controller_Get_Succeeds_MultiItem_World(string worldOrDc) currentlyShown.Items.First(item => item.Key == document2.ItemId).Value, test.GameData); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_SingleItem_DataCenter(string worldOrDc) @@ -145,7 +145,7 @@ public async Task Controller_Get_Succeeds_SingleItem_DataCenter(string worldOrDc worldOrDc); } - [Theory(Skip = "Testing without history")] + [Theory] [InlineData("crystaL")] [InlineData("Crystal")] public async Task Controller_Get_Succeeds_MultiItem_DataCenter(string worldOrDc) @@ -355,7 +355,7 @@ public async Task Controller_Get_Succeeds_MultiItem_DataCenter_WhenNotMarketable Assert.Null(history.WorldId); } - [Fact(Skip = "Testing without history")] + [Fact] public async Task Controller_Get_Succeeds_SingleItem_Fields() { var test = TestResources.Create(); diff --git a/src/Universalis.Application/Controllers/CurrentlyShownControllerBase.cs b/src/Universalis.Application/Controllers/CurrentlyShownControllerBase.cs index ef4e68e1..6791000e 100644 --- a/src/Universalis.Application/Controllers/CurrentlyShownControllerBase.cs +++ b/src/Universalis.Application/Controllers/CurrentlyShownControllerBase.cs @@ -171,9 +171,10 @@ public CurrentlyShownControllerBase(IGameDataProvider gameData, ICurrentlyShownD var dataByItemId = data .GroupBy(view => view.ItemId) .Select(itemIdViews => CollateWorldViews(itemIdViews, worldDcRegion, worldIds, itemIdViews.Key, nListings, - nEntries, onlyHq, statsWithin, entriesWithin, fields)); + nEntries, onlyHq, statsWithin, entriesWithin, fields)) + .ToArray(); - return dataByItemId.ToArray(); + return dataByItemId; } /// @@ -409,7 +410,7 @@ private async Task> FetchDataBatched(IEnumerable var cs = await csTask; var csDict = CollectListings(cs); - var history = Array.Empty(); + var history = await hTask; var historyDict = CollectSales(history); return worldItemPairs