Exemplo n.º 1
0
        public async Task AddIngrediant()
        {
            await InitializeAsync();

            var newIngrediant = "New Ingrediant";

            using (IIngrediantService service = GetService())
            {
                var output = await service.AddAsync(newIngrediant);

                Assert.NotNull(output);
                Assert.NotEqual(0, output.Id);
                Assert.Equal(this.TestData.Ingrediants.Count + 1, this.DbContext.Ingrediants.Count());
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new Ingrediant Controller, which grants access to interaction with ingrediants
 /// </summary>
 /// <param name="service">service grants acces to the ingrediant store</param>
 public IngrediantsController(IIngrediantService service)
 {
     _service = service;
 }