public void ShouldBeConvertedToSpanWithTermination() { var span = origination.To(termination); span.Origination.Originate(); Assert.IsTrue(origination.Originated); span.Termination.Terminate(); Assert.IsTrue(termination.Terminated); }
public void ShouldBeConvertedToSpanWithTerminationAsAction() { var expected = false; var span = origination.To(() => { expected = true; }); span.Origination.Originate(); Assert.IsTrue(origination.Originated); span.Termination.Terminate(); Assert.IsTrue(expected); }
public void ShouldBeConvertedToCycleWithSpan() { var span = origination.To(termination); var cycle = execution.In(span); cycle.Span.Origination.Originate(); Assert.IsTrue(origination.Originated); cycle.Execution.Execute(); Assert.IsTrue(execution.Executed); cycle.Span.Termination.Terminate(); Assert.IsTrue(termination.Terminated); }
public void ShouldInitializeThenFinalize() { var origination = new FakeOrigination(); var termination = new FakeTermination(); using (origination.To(termination).Open()) { Assert.IsTrue(origination.Originated); } Assert.IsTrue(termination.Terminated); }