Ejemplo n.º 1
0
        public async Task CreateWNewItem__IIisCreated()
        {
            try
            {
                var ii = new InventoryItem()
                {
                    Amount = 3,
                    Item   = new Item()
                    {
                        Name = "juice",
                        AverageLifespanDays = 3
                    }
                };
                await uut.CreateWNewItem(null, 1, ii, "Bearer " + jwt);

                var item = dbc.Item.Single(i => i.Name == "juice");
                Assert.That(item.AverageLifespanDays, Is.EqualTo(3));
            }
            finally
            {
                await dbc.DisposeAsync();
            }
        }
Ejemplo n.º 2
0
 public void Dispose()
 {
     _context.DisposeAsync();
 }