Skip to content

Commit 603167c

Browse files
committed
test: create null scenario
Signed-off-by: Otavio Santana <[email protected]>
1 parent 007c98a commit 603167c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

jnosql-arangodb/src/test/java/org/eclipse/jnosql/databases/arangodb/integration/TemplateIntegrationTest.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,39 @@ void shouldUpdateEmbeddable() {
147147
});
148148
}
149149

150+
@Test
151+
void shouldUpdateEmbeddable2() {
152+
var workflowStep = WorkflowStep.builder()
153+
.id("id")
154+
.key("key")
155+
.workflowSchemaKey("workflowSchemaKey")
156+
.stepName("stepName")
157+
.mainStepType(MainStepType.MAIN)
158+
.stepNo(null)
159+
.componentConfigurationKey("componentConfigurationKey")
160+
.relationTypeKey("relationTypeKey")
161+
.availableTransitions(null)
162+
.build();
163+
var result = this.template.insert(workflowStep);
164+
165+
SoftAssertions.assertSoftly(soft ->{
166+
soft.assertThat(result).isNotNull();
167+
soft.assertThat(result.id()).isEqualTo("workflow_step/key");
168+
soft.assertThat(result.key()).isEqualTo("key");
169+
soft.assertThat(result.workflowSchemaKey()).isEqualTo("workflowSchemaKey");
170+
soft.assertThat(result.stepName()).isEqualTo("stepName");
171+
soft.assertThat(result.mainStepType()).isEqualTo(MainStepType.MAIN);
172+
soft.assertThat(result.stepNo()).isNull();
173+
soft.assertThat(result.componentConfigurationKey()).isEqualTo("componentConfigurationKey");
174+
soft.assertThat(result.relationTypeKey()).isEqualTo("relationTypeKey");
175+
soft.assertThat(result.availableTransitions()).hasSize(1);
176+
soft.assertThat(result.availableTransitions().get(0).targetWorkflowStepKey()).isEqualTo("TEST_WORKFLOW_STEP_KEY");
177+
soft.assertThat(result.availableTransitions().get(0).stepTransitionReason()).isEqualTo(REPEAT);
178+
soft.assertThat(result.availableTransitions().get(0).mailTemplateKey()).isNull();
179+
soft.assertThat(result.availableTransitions().get(0).restrictedRoleGroups()).hasSize(1);
180+
soft.assertThat(result.availableTransitions().get(0).restrictedRoleGroups().get(0)).isEqualTo("ADMIN");
181+
});
182+
}
183+
150184

151185
}

0 commit comments

Comments
 (0)