public void GetAllSites()
        {
            SiteSqlDAO dao = new SiteSqlDAO(connectionString);

            IList <Site> sites = dao.GetAllSites(newSiteId);

            Assert.AreEqual(1, sites.Count);
        }
コード例 #2
0
        public void GetCountOfSites()
        {
            ISiteDAO dao = new SiteSqlDAO(connectionString);

            IList <Site> sites = dao.GetAllSites(this.campId);

            // Our test database contains one campsite
            Assert.AreEqual(1, sites.Count);
        }
コード例 #3
0
        public void GetAllSites_ShouldReturn1()
        {
            //Arrange
            SiteSqlDAO dao = new SiteSqlDAO(ConnectionString);
            //Act
            IList <Site> output = dao.GetAllSites(this.CampgroundId);

            //Assert
            Assert.AreEqual(1, output.Count);
        }
コード例 #4
0
        public void GetCountOfSites()
        {
            // Arrange
            ISiteDAO dao = new SiteSqlDAO(connectionString);

            // Act
            IList <Site> sites = dao.GetAllSites(campId);

            // Assert
            // Our test database has one site
            Assert.AreEqual(1, sites.Count);
        }
コード例 #5
0
        public void GetAllSitesTest()
        {
            // Arrange
            IList <Site> sites;
            ISiteDAO     dao = new SiteSqlDAO(connection);

            // Act
            sites = dao.GetAllSites();

            // Assert
            Assert.AreEqual(51, sites.Count);
        }
コード例 #6
0
        public void GetAllSitesInCampgroundTest()
        {
            // Arrange
            IList <Site> sites;
            Campground   c = new Campground()
            {
                CampgroundID = 7
            };
            ISiteDAO dao = new SiteSqlDAO(connection);

            // Act
            sites = dao.GetAllSites(c);

            // Assert
            Assert.AreEqual(5, sites.Count);
        }