public void Activityof_test() { var eventGraph = _builder.ActivityCompletedGraph(Identity.New("Activity1", "1.0"), "id", "result"); var activityCompletedEvent = new ActivityCompletedEvent(eventGraph.First(), eventGraph); var workflow = new TestWorkflow(); var activity = workflow.GetActivityOf(activityCompletedEvent); Assert.That(activity, Is.EqualTo(new ActivityItem(Identity.New("Activity1", "1.0"), workflow))); }
public void Get_activity_by_its_event() { var identity = Identity.New("Activity1", "1.0"); var eventGraph = _graphBuilder.ActivityCompletedGraph(identity.ScheduleId(), "id", "result"); var activityCompletedEvent = new ActivityCompletedEvent(eventGraph.First(), eventGraph); var workflow = new TestWorkflow(); var activity = workflow.GetActivityOf(activityCompletedEvent); Assert.That(activity, Is.EqualTo(new ActivityItem(identity, workflow))); }