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()); helper = new RegionViewModelInitializeTestHelper(towns, viewModel); }