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."); }
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)); }