public void GetItemByProductIdTest() { CompanyGroup.Dto.WebshopModule.GetItemByProductIdRequest request = new CompanyGroup.Dto.WebshopModule.GetItemByProductIdRequest("SCD400G", "hrp", "F191A34A6D29417D80EEC643AFB0C80A", "HUF"); HttpResponseMessage response = CreateHttpClient().PostAsJsonAsync("Product/GetItemByProductId", request).Result; if (response.IsSuccessStatusCode) { CompanyGroup.Dto.WebshopModule.Product product = response.Content.ReadAsAsync<CompanyGroup.Dto.WebshopModule.Product>().Result; Assert.IsNotNull(product); } else { TestContext.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase); } }
public void GetCompatibleProductsTest() { CompanyGroup.Dto.WebshopModule.GetItemByProductIdRequest request = new CompanyGroup.Dto.WebshopModule.GetItemByProductIdRequest("NWA3160", "hrp", "alma", "HUF"); HttpResponseMessage response = CreateHttpClient().PostAsJsonAsync("Product/GetCompatibleProducts", request).Result; if (response.IsSuccessStatusCode) { CompanyGroup.Dto.WebshopModule.CompatibleProducts compatibleProducts = response.Content.ReadAsAsync<CompanyGroup.Dto.WebshopModule.CompatibleProducts>().Result; Assert.IsNotNull(compatibleProducts); } else { TestContext.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase); } }