public ServiceModel.Types.ProductData GetProduct(int productId) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; string parms = "excludes=taxonomy,price,promotion,bulk_ship,rating_and_review_reviews,rating_and_review_statistics,question_answer_statistics,available_to_promise_network,deep_red_labels"; string clientUri = string.Format("{0}?{1}", productId, parms); var response = _jsonServiceClient.Get <Messages.ReadRedskyProductInfoResponse>(clientUri); return(_redskyProductMapper.MapToInternalProductModel(response.product)); }
public void Map_Should_Return_Product() { // Setup var redSkyProduct = new Model.RedskyProduct { item = new Model.RedskyItem { tcin = _fixture.Create <int>().ToString(), product_description = new Model.RedskyItemDescription { title = _fixture.Create <string>() } } }; // Act var result = _redskyProductMapper.MapToInternalProductModel(redSkyProduct); // Assert result.ProductId.Should().Equals(redSkyProduct.item.tcin); }