Skip to content

Commit

Permalink
Make not possible to have EventDefinitionOn.NONE and event definition…
Browse files Browse the repository at this point in the history
… kind in the same time
  • Loading branch information
csouchet committed Sep 28, 2023
1 parent 7a4697b commit ad246a9
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions test/unit/helpers/JsonBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,7 @@ describe('build json', () => {
event: [
{
bpmnKind: 'intermediateCatchEvent',
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.NONE, eventDefinition: {} },
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.DEFINITIONS },
source: 'event_definition_source_id',
},
],
Expand All @@ -2556,9 +2556,10 @@ describe('build json', () => {
definitions: {
targetNamespace: '',
collaboration: { id: 'collaboration_id_0' },
linkEventDefinition: { id: 'event_definition_id' },
process: {
id: '0',
intermediateCatchEvent: { id: 'event_id_0_0', source: 'event_definition_source_id' },
intermediateCatchEvent: { id: 'event_id_0_0', source: 'event_definition_source_id', eventDefinitionRef: 'event_definition_id' },
},
BPMNDiagram: {
name: 'process 0',
Expand All @@ -2580,7 +2581,7 @@ describe('build json', () => {
event: [
{
bpmnKind: 'intermediateCatchEvent',
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.NONE, eventDefinition: {} },
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.DEFINITIONS },
source: ['event_definition_source_1_id', 'event_definition_source_2_id'],
},
],
Expand All @@ -2591,9 +2592,10 @@ describe('build json', () => {
definitions: {
targetNamespace: '',
collaboration: { id: 'collaboration_id_0' },
linkEventDefinition: { id: 'event_definition_id' },
process: {
id: '0',
intermediateCatchEvent: { id: 'event_id_0_0', source: ['event_definition_source_1_id', 'event_definition_source_2_id'] },
intermediateCatchEvent: { id: 'event_id_0_0', source: ['event_definition_source_1_id', 'event_definition_source_2_id'], eventDefinitionRef: 'event_definition_id' },
},
BPMNDiagram: {
name: 'process 0',
Expand All @@ -2615,7 +2617,7 @@ describe('build json', () => {
event: [
{
bpmnKind: 'intermediateCatchEvent',
eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.NONE, eventDefinition: {} },
eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.DEFINITIONS },
source: 'event_definition_source_id',
},
],
Expand All @@ -2626,9 +2628,10 @@ describe('build json', () => {
definitions: {
targetNamespace: '',
collaboration: { id: 'collaboration_id_0' },
messageEventDefinition: { id: 'event_definition_id' },
process: {
id: '0',
intermediateCatchEvent: { id: 'event_id_0_0' },
intermediateCatchEvent: { id: 'event_id_0_0', eventDefinitionRef: 'event_definition_id' },
},
BPMNDiagram: {
name: 'process 0',
Expand All @@ -2652,7 +2655,7 @@ describe('build json', () => {
event: [
{
bpmnKind: 'intermediateThrowEvent',
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.NONE, eventDefinition: {} },
eventDefinitionParameter: { eventDefinitionKind: 'link', eventDefinitionOn: EventDefinitionOn.DEFINITIONS },
target: 'event_definition_target_id',
},
],
Expand All @@ -2663,9 +2666,10 @@ describe('build json', () => {
definitions: {
targetNamespace: '',
collaboration: { id: 'collaboration_id_0' },
linkEventDefinition: { id: 'event_definition_id' },
process: {
id: '0',
intermediateThrowEvent: { id: 'event_id_0_0', target: 'event_definition_target_id' },
intermediateThrowEvent: { id: 'event_id_0_0', target: 'event_definition_target_id', eventDefinitionRef: 'event_definition_id' },
},
BPMNDiagram: {
name: 'process 0',
Expand All @@ -2687,7 +2691,7 @@ describe('build json', () => {
event: [
{
bpmnKind: 'intermediateThrowEvent',
eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.NONE, eventDefinition: {} },
eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.DEFINITIONS },
target: 'event_definition_target_id',
},
],
Expand All @@ -2698,9 +2702,10 @@ describe('build json', () => {
definitions: {
targetNamespace: '',
collaboration: { id: 'collaboration_id_0' },
messageEventDefinition: { id: 'event_definition_id' },
process: {
id: '0',
intermediateThrowEvent: { id: 'event_id_0_0' },
intermediateThrowEvent: { id: 'event_id_0_0', eventDefinitionRef: 'event_definition_id' },
},
BPMNDiagram: {
name: 'process 0',
Expand Down

0 comments on commit ad246a9

Please sign in to comment.