public void SearchReservationRun_DatesThatFallOutside_ReturnsNoList() { var arrival = new DateTime(2019, 07, 19); var departure = new DateTime(2019, 07, 27); CampSiteSqlDAO dao = new CampSiteSqlDAO(ConnectionString); IList <CampSite> campSites = dao.SearchReservationRun(CampgroundId, arrival, departure); Assert.AreEqual(0, campSites.Count); }
public void SearchReservationRun_ReturnsListOfCampsites() { var arrival = new DateTime(2019, 02, 01); var departure = new DateTime(2019, 02, 08); CampSiteSqlDAO dao = new CampSiteSqlDAO(ConnectionString); IList <CampSite> campSites = dao.SearchReservationRun(CampgroundId, arrival, departure); Assert.AreEqual(1, campSites.Count); }
static void Main(string[] args) { // Get the connection string from the appsettings.json file IConfigurationBuilder builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); IConfigurationRoot configuration = builder.Build(); string connectionString = configuration.GetConnectionString("Project"); IParkDAO parkDAO = new ParkSqlDAO(connectionString); ICampGroundDAO campGroundDAO = new CampGroundSqlDAO(connectionString); ICampSiteDAO campSiteDAO = new CampSiteSqlDAO(connectionString); IReservationDAO reservationDAO = new ReservationSqlDAO(connectionString); MainMenuCLI camp = new MainMenuCLI(parkDAO, campGroundDAO, campSiteDAO, reservationDAO); camp.RunMenuCLI(); }