public void Get_ShouldReturnAllDistricts() { var unitOfWork = GetUnitOfWork(); var controller = new DistrictController(unitOfWork); var result = controller.Get() as TestDistrictDbSet; Assert.IsNotNull(result); Assert.AreEqual(3, result.Local.Count); //Make sure the repository includes the primary vendor in the result foreach (var district in result) { Assert.IsNotNull(district.PrimaryVendor); } }
public void DistrictControllerTest_GetAll() { var d = controller.Get(); Assert.AreNotEqual(0, d.ToList().Count()); }