async Task Add() { var name = await App.Current.MainPage.DisplayPromptAsync("Name", "Name of coffee"); var roaster = await App.Current.MainPage.DisplayPromptAsync("Roaster", "Roaster of coffee"); await CoffeeService.AddCoffee(name, roaster); await Refresh(); }
public void AddNullCoffee_Throws_NewException() { var ex = Assert.ThrowsAsync <Exception>(() => coffeeService.AddCoffee(null)); Assert.AreEqual(ex.Message, "You should not add null entries!"); }