Exemplo n.º 1
0
 public void TestInitialize()
 {
     townRepository.Setup(x => x.GetAll()).Returns(towns.AsQueryable());
     townRepository.Setup(x => x.GetAllList()).Returns(townRepository.Object.GetAll().ToList());
     townRepository.Setup(x => x.Count()).Returns(townRepository.Object.GetAll().Count());
     controller = new RegionController(townRepository.Object, null, null, null);
     helper = new RegionAndAddTownTestHelper(controller, townRepository.Object);
 }
 public void TestInitialize()
 {
     townRepository.Setup(x => x.GetAll()).Returns(towns.AsQueryable());
     townRepository.Setup(x => x.GetAllList()).Returns(townRepository.Object.GetAll().ToList());
     townRepository.Setup(x => x.Count()).Returns(townRepository.Object.GetAll().Count());
     controller = new RegionController(townRepository.Object, null, null, null);
     helper     = new RegionAndAddTownTestHelper(controller, townRepository.Object);
 }