Ejemplo n.º 1
0
        public async Task CreateCustomerAsync()
        {
            using (var controllerStore = new EntitiesController(AuthenticationProvider))
            {
                // Produto para criar no invoicing
                Client resource = new Client("C-MD-0002", "Miguel Dias", "Rua dos Bombeiros", "Leiria", "4509-003");

                var result = await controllerStore.PostCustomerItem(resource);

                if (string.IsNullOrEmpty(result.Value))
                {
                    throw new Exception((result.Result as ObjectResult).Value.ToString());
                }

                Assert.IsTrue(!string.IsNullOrEmpty(result.Value));
            }
        }