コード例 #1
0
        public void GetAvailableSitesTest()
        {
            //Arrange
            SitesSqlDAL     siteDal    = new SitesSqlDAL(connectionString);
            List <Site>     sites      = new List <Site>();
            DateTime        arrival2   = new DateTime(2019, 6, 5);
            DateTime        departure2 = new DateTime(2019, 6, 15);
            UserReservation reserve4   = new UserReservation(7, arrival2, departure2);

            //Act
            sites = siteDal.GetAvailableSites(reserve4);

            // Assert
            //Assert.AreEqual(13, sites[siteId1].SiteNumber);
            //Assert.AreEqual(14, sites[siteId2].SiteNumber);
            //Assert.AreEqual(15, sites[siteId3].SiteNumber);
            //Assert.AreEqual(16, sites[siteId4].SiteNumber);

            CollectionAssert.Contains(sites, site);
        }