public void Should_add_and_launch_wait_jobs_for_missing_states() { state.AllJobs[state2.Name] = Substitute.For <IStreamJob>(); synchronizer.Synchronize(state); state.AllJobs.Should().HaveCount(3); state.AllJobs.Keys.Should().BeEquivalentTo("state1", "state2", "state3"); jobFactory.ReceivedCalls().Should().HaveCount(2); jobFactory.Received(1).CreateJob(state1); jobFactory.Received(1).CreateJob(state3); jobLauncher.ReceivedCalls().Should().HaveCount(2); jobLauncher.Received(1).LaunchWaitJob(state.AllJobs[state1.Name], state); jobLauncher.Received(1).LaunchWaitJob(state.AllJobs[state3.Name], state); }
public void Should_do_nothing_when_completed_task_is_neither_send_job_nor_wait_job() { handler.HandleCompletedJob(Task.CompletedTask, state); launcher.ReceivedCalls().Should().BeEmpty(); }