public void checkIfAllBpmnFormsWereDeployed()

in src/main/java/platform/qa/steps/RegulationsStepDefinitions.java [109:131]


    public void checkIfAllBpmnFormsWereDeployed() {
        List<String> expectedForms =
                convertToStringList(testContext.getScenarioContext().getContext(Context.BPMN_FORM_KEY_LIST));
        List<String> actualForms =
                convertToStringList(testContext.getScenarioContext().getContext(Context.API_FORM_KEY_LIST));

        List<String> expectedProcesses =
                convertToStringList(testContext.getScenarioContext().getContext(Context.BPMN_PROCESS_NAME_LIST));
        List<String> actualProcesses =
                convertToStringList(testContext.getScenarioContext().getContext(Context.API_PROCESS_NAME_LIST));

        assertSoftly(softly -> {
            softly.assertThat(actualForms).as("Кількість розгорнутих форм на оточенні менша ніж в "
                    + "registry-regulations репозиторії:").hasSizeGreaterThanOrEqualTo(expectedForms.size());
            softly.assertThat(actualForms).as("Форми розгорнені на оточенні не співпадають з усіма необхідними в "
                    + "registry-regulations репозиторії").containsAll(expectedForms);

            softly.assertThat(actualProcesses).as("Кількість розгорнутих процесів на оточенні менша ніж в "
                    + "registry-regulations репозиторії:").hasSizeGreaterThanOrEqualTo(expectedProcesses.size());
            softly.assertThat(actualProcesses).as("Процеси розгорнені на оточенні не співпадають з усіма необхідними "
                    + "в registry-regulations репозиторії").containsAll(expectedProcesses);
        });
    }