public void Should_not_be_active_when_activity_is_cancelled() { var cancelledGraph = _builder.ActivityCancelledGraph(Identity.New(ActivityName, ActivityVersion).ScheduleId(), "id", "details"); var workflowHistoryEvents = new WorkflowHistoryEvents(cancelledGraph); Assert.IsFalse(workflowHistoryEvents.HasActiveEvent()); }
public void All_events_can_return_cancelled_event_and_cancel_requested_event() { var eventGraph = _eventGraphBuilder.ActivityCancelledGraph(_scheduleId, "workerid", "detail"); var activityItem = CreateActivityItemWith(eventGraph); var allEvents = activityItem.AllEvents(true); Assert.That(allEvents, Is.EqualTo(new WorkflowItemEvent[] { new ActivityCancelledEvent(eventGraph.First(), eventGraph), new ActivityCancelRequestedEvent(eventGraph.Skip(1).First()), })); }
public void Setup() { _builder = new EventGraphBuilder(); var scheduleId = Guflow.Decider.Identity.New(ActivityName, ActivityVersion, PositionalName).ScheduleId(); var cancelledActivityEventGraph = _builder.ActivityCancelledGraph(scheduleId, Identity, Detail); _activityCancelledEvent = new ActivityCancelledEvent(cancelledActivityEventGraph.First(), cancelledActivityEventGraph); }