public async Task Will_start_all_projects_by_default() { _configServiceMock.Setup(m => m.GetConfigurationAsync(It.IsAny <CommandOptions>())) .ReturnsAsync(SampleProjects.ConfigurationDefault) .Verifiable(); _runnerServiceMock.Setup(m => m.StartAsync(It.IsAny <IList <Project> >(), It.IsAny <CommandOptions>(), It.IsAny <CancellationToken>())) .Callback((IList <Project> projects, CommandOptions options, CancellationToken token) => { foreach (var p in projects) { p.Processes.Add(new AppProcess(new Process(), AppTask.Start, AppStatus.Success)); } }) .Returns((IList <Project> projects, CommandOptions options, CancellationToken token) => Task.FromResult(projects)) .Verifiable(); StartCommand command = CreateCommand(); int statusCode = await command.OnExecute(); Assert.Equal(0, statusCode); _configServiceMock.Verify(); _runnerServiceMock.Verify(); }