public void CheckAvailableSites_Test() { ISiteDAO dao = new SiteSqlDAO(connectionString); Campground camp = new Campground(); camp.CampgroundID = campId; camp.OpenFrom = 1; camp.OpenTo = 12; IList <Site> siteRes = dao.AvailableSites(camp, Convert.ToDateTime("2019-06-08"), Convert.ToDateTime("2019-06-12")); Assert.AreEqual(1, siteRes.Count); siteRes = dao.AvailableSites(camp, Convert.ToDateTime("2019-07-03"), Convert.ToDateTime("2019-07-08")); Assert.AreEqual(0, siteRes.Count); }
public void AvailableSitesTest() { //Arrange SiteSqlDAO siteSqlDAO = new SiteSqlDAO(connectionString); //Act IList <Site> sites = siteSqlDAO.AvailableSites(testCampgroundId, testStartDate, testEndDate); //Assert Assert.IsTrue(sites.Count > 0); }
public void AvailableSitesTests() { // Arrange SiteSqlDAO dao = new SiteSqlDAO(connectionString); // Act IList <Site> actual = dao.AvailableSites(lastCampgroundId, new DateTime(2020, 04, 05), new DateTime(2020, 04, 07)); // Assert Assert.AreEqual(1, actual.Count); }