Пример #1
0
        public void DeleteCoffeeWithEmptyId_Throws_NewException()
        {
            var coffeeToDelete = new CoffeeModel();
            var ex             = Assert.Throws <Exception>(() => coffeeService.DeleteCoffee(coffeeToDelete.Id));

            Assert.AreEqual(ex.Message, "The Id given is empty");
        }
        public void DeleteCoffeeWithEmptyId_Throws_NewException()
        {
            var ex = Assert.ThrowsAsync <Exception>(() => coffeeService.DeleteCoffee(Guid.Empty));

            Assert.AreEqual(ex.Message, "Please provide an ID!");
        }