コード例 #1
0
        public void CallSizeAll_ReturnsNoProducts()
        {
            var response = SteamApiClient.GetSteamProductsAsync(IncludeProducts.GameProducs, callSize: ProductCallSize.All)
                           .Result;

            Assert.True(response.Contents.Count > (int)ProductCallSize.Max);
        }
コード例 #2
0
        public void CallSizeDefined_ReturnsCorrectAmountOfProducs(ProductCallSize callSize)
        {
            var response = SteamApiClient.GetSteamProductsAsync(IncludeProducts.Games, callSize: callSize)
                           .Result;

            SleepAfterSendingRequest();

            Assert.True((int)callSize >= response.Contents.Count);
        }
コード例 #3
0
        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);
            });
        }
コード例 #4
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);
            }
        }