public async Task ShouldGetListOfProjects() { Repository.Projects.FindAll().Returns(new List <ProjectResource> { new ProjectResource { Name = "ProjectA", Id = "projectaid" }, new ProjectResource { Name = "ProjectB", Id = "projectbid" } }); await listProjectsCommand.Execute(CommandLineArgs.ToArray()).ConfigureAwait(false); LogLines.Should().Contain("Projects: 2"); LogLines.Should().Contain(" - ProjectA (ID: projectaid)"); LogLines.Should().Contain(" - ProjectB (ID: projectbid)"); }
public void ShouldGetListOfProjects() { Repository.Projects.FindAll().Returns(new List <ProjectResource> { new ProjectResource { Name = "ProjectA", Id = "projectaid" }, new ProjectResource { Name = "ProjectB", Id = "projectbid" } }); listProjectsCommand.Execute(CommandLineArgs.ToArray()); Log.Received().Info("Projects: 2"); Log.Received().InfoFormat(" - {0} (ID: {1})", "ProjectA", "projectaid"); Log.Received().InfoFormat(" - {0} (ID: {1})", "ProjectB", "projectbid"); }