public ListRestaurantsForm() { InitializeComponent(); string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); restaurantList = (List <RestaurantModel>)restaurantServices.GetAll(); AddRestaurantList(restaurantList); }
public void Reload() { restaurantPanel.Controls.Clear(); string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); restaurantList = (List <RestaurantModel>)restaurantServices.GetAll(); AddRestaurantList(restaurantList); }
public void ShouldReturnListOfRestaurants() { List <RestaurantModel> restaurantModelList = (List <RestaurantModel>)_restaurantServices.GetAll(); Assert.NotEmpty(restaurantModelList); foreach (RestaurantModel rm in restaurantModelList) { _testOutputHelper.WriteLine($"Name:{rm.RestaurantName}\nAddress:{rm.RestaurantAddress}\n"); } }