public void TestDeleteDistrictWithCityIn() { List <City> cities = _GetCities(); DynamicMock dynamicMock = new DynamicMock(typeof(LocationsManager)); dynamicMock.SetReturnValue("GetCities", cities); dynamicMock.Expect("DeleteDistrictById", 2); LocationsManager mocklocationManager = (LocationsManager)dynamicMock.MockInstance; LocationServices locationService = new LocationServices(mocklocationManager); Assert.AreEqual(false, locationService.DeleteDistrict(2)); }