public void TraceTrackingParticipantShouldTrace() { // Arrange var target = new TraceTrackingParticipant(); var host = new WorkflowApplication(new Sequence()); host.Extensions.Add(target); var memoryListener = new MemoryListener(); Trace.Listeners.Add(memoryListener); // Act host.RunEpisode(); Assert.IsTrue(memoryListener.Records.Count > 0); }
public void TraceTrackingParticipantShouldTraceOptions() { // Arrange var memoryListener = new MemoryListener(); Trace.Listeners.Add(memoryListener); var target = new TraceTrackingParticipant(TrackingOption.All); var host = WorkflowApplicationTest.Create(new Sequence()); host.Extensions.Add(target); // Act try { host.TestWorkflowApplication.RunEpisode(Constants.Timeout); Assert.AreEqual(5, memoryListener.Records.Count); } finally { host.Tracking.Trace(); } }