Ejemplo n.º 1
0
        public void t_Site_Select_All()
        {
            // Backdoor setup
            List <Location_ado> list        = DbTestHelper.LoadExtraneousLocations();
            List <Location_ado> siteAdoList = extraSites(list);

            // Exercise the test
            List <Site> siteList = SiteMapper.SelectAll();

            // Validate results
            Assert.AreEqual(siteAdoList.Count(), siteList.Count, "Wrong number of objects in the result list");
            foreach (Location_ado ado in siteAdoList)
            {
                // just check to make sure the object is there; leave specific value check for the Select_ByGuid test
                Assert.IsTrue(siteList.Exists(x => x.Id.Equals(ado.LocationId)), "Location " + ado.LocationId.ToString() + " is not in the results");
            }
        }