Пример #1
0
        public void BuildProductLookupMultipleItemRequestQuery()
        {
            //Arrange
            IApiRequestBuilder        builder = new ApiRequestBuilder();
            ProductLookupRequestInput request = new ProductLookupRequestInput
            {
                ids = new List <int> {
                    93874234, 238479023
                }
            };

            //Act
            var result = builder.GetProductLookupApiQueryString(request, "test");

            //Assert
            var expectedValue = @"apiKey=test&ids=93874234%2C238479023";

            Assert.Equal(expectedValue, result);
        }
Пример #2
0
        public void BuildProductLookupRequestQuery()
        {
            //Arrange
            IApiRequestBuilder        builder = new ApiRequestBuilder();
            ProductLookupRequestInput request = new ProductLookupRequestInput
            {
                ids = new List <int> {
                    29372934
                }
            };

            //Act
            var result = builder.GetProductLookupApiQueryString(request, "test");

            //Assert
            var expectedValue = @"apiKey=test&ids=29372934";

            Assert.Equal(expectedValue, result);
        }