public void ShouldFindSingleChild() { var continuation = new Continuation {Id = _job.Id}; var match = continuation.Find(_job); Assert.Equal(continuation, match); }
public void ShouldFindContinuationsInOnAnyFailure() { var continuation = new Continuation { Id = Guid.NewGuid(), OnAnyFailed = new Continuation {Id = _job.Id} }; var match = continuation.Find(_job); Assert.Equal(continuation.OnAnyFailed, match); }
public void ShouldFindNextContinuation() { var continuation = new Continuation { Id = Guid.NewGuid(), Next = new Continuation {Id = _job.Id} }; var match = continuation.Find(_job); Assert.Equal(continuation.Next, match); }
public void ShouldFindContinuationsInGroup() { var matchingChild = new Continuation {Id = _job.Id}; var continuation = new Continuation { Children = new [] { new Continuation { Id = Guid.NewGuid() }, matchingChild } }; var match = continuation.Find(_job); Assert.Equal(matchingChild, match); }
public void ShouldReturnNullIfNoMatchingContinuationIsFoundAnywhere() { var continuation = new Continuation { Children = new[] {new Continuation()}, OnAnyFailed = new Continuation(), OnAllFailed = new Continuation() }; var match = continuation.Find(_job); Assert.Null(match); }