private void PopulateData(ListView ideaList) { var ideas = _ideaService.All(); foreach (var idea in ideas) { ideaList.Items.Add(idea.Id.ToString(), idea.Description, null); } }
public void Repository_is_called_when_retrieving_an_idea_list() { //Arrange var repository = Substitute.For <IIdeaRepository>(); IIdeaService service = new IdeaService(repository); //Act service.All(); //Assert repository.Received().Retrieve(); }