public ActionResult Index() { var model = new ListProjectSourceModel(); var objs = ProjectSourceLogic.GetAll(); model.ProjectSources = ModelConverter.Convert(objs); return(View(model)); }
public void GetAll_No_ProjectSources_Found() { //arrange var mockRepository = new Mock <IInnerTrackRepository>(); mockRepository.Setup(m => m.GetProjectSources(It.Is <ProjectSourceFilter>(f => !f.Id.HasValue))).Returns(new List <ProjectSourceObj>()); var logic = new ProjectSourceLogic(mockRepository.Object); //act var actual = logic.GetAll(); //assert Assert.IsNotNull(actual); Assert.AreEqual(0, actual.Count); }