public void SetUp() { var restaurants = new List <Restaurant>() { new Restaurant { Name = "Milliways", CuisineTypes = new List <CuisineType>() { new CuisineType { Name = "Gourmet" }, new CuisineType { Name = "Dim Sum" }, new CuisineType { Name = "English Breakfast" } }, RatingAverage = "5" } }; _displaySpy = new Mock <IDisplay>(); var displayAdapter = new DisplayAdapter(_displaySpy.Object); displayAdapter.Display(restaurants); }
static void Main(string[] args) { string outCode = "SE19"; if (0 < args.Length) { outCode = args[0]; } if (string.IsNullOrEmpty(outCode)) { outCode = "SE19"; } var jeApi = new JeApiClient(); var restaurants = jeApi.GetRestaurantsFor(outCode); var displayAdapter = new DisplayAdapter(new ConsoleDisplay()); displayAdapter.Display(restaurants.Restaurants); Console.WriteLine(); Console.WriteLine("PRESS ANY KEY TO EXIT"); Console.ReadLine(); }