コード例 #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");
        }
コード例 #2
0
        public void DeleteCoffeeWithEmptyId_Throws_NewException()
        {
            var ex = Assert.ThrowsAsync <Exception>(() => coffeeService.DeleteCoffee(Guid.Empty));

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