示例#1
0
        public void CreateTerritoriesReturnsEmptyListWhenEmptyEnumerableGiven()
        {
            var territoryEntities = new List <TerritoryEntity>();

            List <Territory> territories = _territoryFactory.CreateTerritories(territoryEntities);

            Assert.IsNotNull(territories, "Null list of Territories returned.");
            Assert.IsEmpty(territories, "Incorrect list of Territories returned.");
        }
示例#2
0
        public List <Territory> GetAllTerritories()
        {
            List <TerritoryEntity> territoryEntities;

            using (var myAdapter = PersistenceLayer.GetDataAccessAdapter())
            {
                var linqMetaData = new LinqMetaData(myAdapter);
                territoryEntities = linqMetaData.Territory.ToList();
            }
            return(_territoryFactory.CreateTerritories(territoryEntities));
        }