Exemplo n.º 1
0
        public void Should_be_active_when_activity_is_started_but_its_cancel_request_failed()
        {
            var eventGraph = _builder.ActivityCancellationFailedGraph(Identity.New(ActivityName, ActivityVersion).ScheduleId(), "reason")
                             .Concat(_builder.ActivityFailedGraph(Identity.New(ActivityName, ActivityVersion).ScheduleId(), "id", "res", "detail"));
            var workflowHistoryEvents = new WorkflowHistoryEvents(eventGraph);

            Assert.IsTrue(workflowHistoryEvents.HasActiveEvent());
        }
Exemplo n.º 2
0
        public void Last_event_is_activity_started_event_when_its_cancel_request_is_failed()
        {
            var eventGraph   = _eventGraphBuilder.ActivityCancellationFailedGraph(_scheduleId, "cause").ToArray();
            var activityItem = CreateActivityItemWith(eventGraph);


            var last = activityItem.LastEvent();

            Assert.That(last, Is.EqualTo(new ActivityStartedEvent(eventGraph.Skip(1).First(), eventGraph)));
        }
Exemplo n.º 3
0
        public void Setup()
        {
            _builder = new EventGraphBuilder();
            var historyEventGraph = _builder.ActivityCancellationFailedGraph(Identity.New(_activityName, _activityVersion).ScheduleId(), _cause);

            _activityCancellationFailedEvent = new ActivityCancellationFailedEvent(historyEventGraph.First());
        }