예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
		/// <summary>
		///     Product properties of the new product.
		/// </summary>
		public CreateService Product(CreateProduct product)
		{
			_product = product;
			return this;
		}