diff options
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap')
3 files changed, 4 insertions, 20 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java index 6bfbac0791..c487125ea6 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java @@ -53,4 +53,4 @@ public class CreatePnfEntryInAaiDelegateTest { assertThat(createdEntry.getPnfName()).isEqualTo("testCorrelationId"); assertThat(createdEntry.isInMaint()).isNull(); } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java index 763a4546e8..8a1cdfa4c0 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java @@ -28,8 +28,6 @@ import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake; import org.junit.Test; public class GeneratePnfUuidDelegateTest { - private static final String UUID_REGEX = "(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5]{1}[0-9a-f]{3}-[89ab]{1}[0-9a-f]{3}-[0-9a-f]{12}$"; - @Test public void execute_shouldSetValidUuidAsPnfUuid() { // given @@ -38,6 +36,6 @@ public class GeneratePnfUuidDelegateTest { // when delegate.execute(execution); // then - assertThat((String) execution.getVariable(PNF_UUID)).matches(UUID_REGEX); + assertThat((String) execution.getVariable(PNF_UUID)).matches(PnfCheckInputs.UUID_REGEX); } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java index d670305a9a..1888831e2e 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java @@ -4,8 +4,6 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ - * Modifications Copyright 2018 Nokia - * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +21,7 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION; @@ -56,18 +54,6 @@ public class PnfCheckInputsTest { } @Test - public void shouldThrowException_whenCorrelationIdIsEmptyString() { - PnfCheckInputs testedObject = prepareExecutionForCorrelationId(""); - assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class); - } - - @Test - public void shouldThrowException_whenTimeoutIsNotSetAndDefaultIsNotDefined() { - PnfCheckInputs testedObject = prepareExecutionForTimeout(null, null); - assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class); - } - - @Test public void shouldThrowException_whenTimeoutIsEmptyStringAndDefaultIsNotDefined() { PnfCheckInputs testedObject = prepareExecutionForTimeout(null, ""); assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class); |