public void TestInitialize() { mockTownRepository.Setup(x => x.GetAll()).Returns(towns.AsQueryable()); mockTownRepository.Setup(x => x.GetAllList()).Returns(mockTownRepository.Object.GetAll().ToList()); mockTownRepository.Setup(x => x.Count()).Returns(mockTownRepository.Object.GetAll().Count()); eNodebRepository.SetupGet(x => x.GetAll()).Returns(lotsOfENodebs.AsQueryable()); controller = new ParametersController(mockTownRepository.Object, eNodebRepository.Object, null, null, null, mockRegionRepository.Object, null); helper = new ENodebListTestHelper(controller); }