public void CallSizeAll_ReturnsNoProducts() { var response = SteamApiClient.GetSteamProductsAsync(IncludeProducts.GameProducs, callSize: ProductCallSize.All) .Result; Assert.True(response.Contents.Count > (int)ProductCallSize.Max); }
public void CallSizeDefined_ReturnsCorrectAmountOfProducs(ProductCallSize callSize) { var response = SteamApiClient.GetSteamProductsAsync(IncludeProducts.Games, callSize: callSize) .Result; SleepAfterSendingRequest(); Assert.True((int)callSize >= response.Contents.Count); }
public void MultipleProductTypes_ReturnsRequestedSteamProducts(IncludeProducts products) { var response = SteamApiClient.GetSteamProductsAsync(products) .Result; SleepAfterSendingRequest(); Assert.NotEmpty(response.Contents); Assert.All(response.Contents, product => { Assert.True(product.AppId != 0); Assert.True(product.LastModified != 0); }); }
public void ProductTypeUsedAsSet_ReturnsRequestedSteamProducts() { var response1 = SteamApiClient.GetSteamProductsAsync(IncludeProducts.GameProducs) .Result; SleepAfterSendingRequest(); var response2 = SteamApiClient.GetSteamProductsAsync(IncludeProducts.DLC | IncludeProducts.Games) .Result; SleepAfterSendingRequest(); for (int i = 0; i < response1.Contents.Count; i++) { Assert.True(response1.Contents[i].AppId == response2.Contents[i].AppId); } }