public void GetCart_CartWith1Product_OperationSuccess() { var preparedCart = _openApiProxyClient.PushToCart(new PushToCartRequest { ProductId = "fincpangfirrnoir", OfferId = "fincpangfirrnoir", Quantity = 1, SellerId = 0, SizeId = null }); var response = _openApiProxyClient.GetCart(new GetCartRequest { CartGuid = preparedCart.CartGuid }); Assert.IsNotNull(response); Assert.IsTrue(response.OperationSuccess); Assert.IsTrue(string.IsNullOrEmpty(response.ErrorMessage)); Assert.AreEqual(preparedCart.CartGuid, response.CartGuid); Assert.AreEqual(preparedCart.CheckoutUrl, response.CheckoutUrl); Assert.AreEqual(1, response.ProductCount); Assert.AreEqual(1, response.TotalQuantity); Assert.IsTrue(response.TotalPrice > 0); Assert.AreNotEqual(response.CreationDate, DateTime.MinValue); Assert.AreNotEqual(response.UpdateDate, DateTime.MinValue); }
public void PushToCart_AddItemCreatingNewCart_OperationSuccess() { var response = _openApiProxyClient.PushToCart(new PushToCartRequest { ProductId = "fincpangfirrnoir", OfferId = "fincpangfirrnoir", Quantity = 1, SellerId = 0, SizeId = null }); Assert.IsNotNull(response); Assert.IsTrue(response.OperationSuccess); Assert.AreEqual("NoError", response.ErrorType); Assert.IsTrue(string.IsNullOrEmpty(response.ErrorMessage)); Assert.IsNotNull(response.CartGuid); Assert.IsNotNull(response.CheckoutUrl); }
public void PushToCart_ApiKeyMissing_MissingApiKeyExceptionRaised() { var response = _openApiProxyClient.PushToCart(new PushToCartRequest { ProductId = "fincpangfirrnoir", OfferId = "fincpangfirrnoir", Quantity = 1, SellerId = 0, SizeId = null }); }