public void GetAllCountries() { //arrange var mockCortexBusinessManager = new Mock <IMasterDataManager>(); //if GetResellerCustomersWithProperties is called with s123, return a new list of CustomerViewModel //with one item in, with id of 1 mockCortexBusinessManager.Setup(m => m.GetCountries()) .Returns(new FilterCriteria()); MasterDataService masterDataManager = new MasterDataService(_imfUnitOfWork); //act var result = masterDataManager.GetCountries();; var countries = result.Countries; //assert Assert.AreEqual(227, countries.Count()); //Assert.AreEqual(1, result.FirstOrDefault().Id) // Assert.IsNotNull(contentResult.Content); //Assert.AreEqual(42, contentResult.Content.Id); }