public void BecomesIdleWithTriggerBookmark()
        {
            // Arrange
            var activity = new WaitForTrigger { Trigger = StateTrigger.T1 };
            var host = WorkflowApplicationTest.Create(activity);
            try
            {
                // Act
                var result = host.TestWorkflowApplication.RunUntilBookmark(StateTrigger.T1);

                // Assert
                Assert.IsInstanceOfType(result, typeof(WorkflowIdleEpisodeResult));
                var idleResult = result as WorkflowIdleEpisodeResult;
                Assert.IsTrue(idleResult.IdleArgs.Bookmarks.Any(StateTrigger.T1));
            }
            finally
            {
                host.Tracking.Trace();
            }
        }
        public void CompletesWhenResumedWithTrigger()
        {
            // Arrange
            var activity = new WaitForTrigger { Trigger = StateTrigger.T1 };
            var host = WorkflowApplicationTest.Create(activity);
            host.TestWorkflowApplication.RunUntilBookmark(StateTrigger.T1);

            try
            {
                // Act
                var result = host.TestWorkflowApplication.ResumeEpisodeBookmark(StateTrigger.T1);

                // Assert
                Assert.IsInstanceOfType(result, typeof(WorkflowCompletedEpisodeResult));
                var idleResult = result as WorkflowCompletedEpisodeResult;
            }
            finally
            {
                host.Tracking.Trace();
            }
        }