public void it_filters_by_user() { ActEntryGathererScenario.Create(_ => { _.UseFile("privilege.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); _.TheUserHasPrivilege("a"); }).ShouldHaveTheSameElementsAs(1001, 1003); ActEntryGathererScenario.Create(_ => { _.UseFile("privilege.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); _.TheUserHasPrivilege("b"); }).ShouldHaveTheSameElementsAs(1002, 1003); }
public void evalutes_the_conditions() { ActEntryGathererScenario.Create(_ => { _.UseFile("nested.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = true }); _.MergeHistory(true); }).ShouldHaveTheSameElementsAs(100, 200, 300, 101, 202, 303); ActEntryGathererScenario.Create(_ => { _.UseFile("nested.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); _.MergeHistory(true); }).ShouldHaveTheSameElementsAs(400, 500, 401); }
public void it_filters_the_act_entries() { ActEntryTest.Value = true; ActEntryConditionRegistry.WithCondition <ActEntryTest>(() => { ActEntryGathererScenario.Create(_ => { _.UseFile("custom-condition.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); }).ShouldHaveTheSameElementsAs(101, 202, 303); }); ActEntryTest.Value = false; ActEntryConditionRegistry.WithCondition <ActEntryTest>(() => { ActEntryGathererScenario.Create(_ => { _.UseFile("custom-condition.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); }).ShouldBeEmpty(); }); }
public void and_workflow_object_is_not_child() { ActEntryGathererScenario.Create(_ => { _.UseFile("is-child.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); }).ShouldHaveTheSameElementsAs(400, 500); }
public void and_setting_is_false() { ActEntryGathererScenario.Create(_ => { _.UseFile("merge.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); _.MergeHistory(false); }).ShouldHaveTheSameElementsAs(404, 505); }
public void and_the_request_is_not_verbose() { ActEntryGathererScenario.Create(_ => { _.UseFile("verbose.history.config"); _.TheWorkflowObjectIs(new WorkflowObject { Type = "case", Id = "1", IsChild = false }); _.ShowAll(false); }).ShouldHaveTheSameElementsAs(2000, 2003); }