public async void TestCreateParameterMissing() { MockFromFile("products.create.parameter_missing"); var service = GetProductsService(); Assert.NotNull(service); var create = new CreateProduct { Spn = "1000", Name = "Produkt 1000", Price = 4.99, OrderUnit = "" }; var response = await service.Create().Pin("AD8CCDD5F9").Area("work").Product(create).Do(); Assert.Null(response); }
public async void TestCreate() { MockFromFile("products.create.success"); var service = GetProductsService(); Assert.NotNull(service); var create = new CreateProduct { Spn = "1000", Name = "Produkt 1000", Price = 4.99, OrderUnit = "PCE" }; var response = await service.Create().Pin("AD8CCDD5F9").Area("work").Product(create).Do(); Assert.NotNull(response); Assert.IsNotNullOrEmpty(response.Link); Assert.AreEqual("store#productsCreateResponse", response.Kind); }
/// <summary> /// Product properties of the new product. /// </summary> public CreateService Product(CreateProduct product) { _product = product; return this; }