diff options
author | Mnushkin, Dmitry <dmitry.mnushkin@att.com> | 2019-10-21 09:25:56 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-12-11 12:09:08 -0500 |
commit | 6514e3bded45ec57f5157afc6d2833fb4e40f271 (patch) | |
tree | 90564370be261656a4116ab2dc814102f5513109 /common/src/test/java/org | |
parent | 1d6c9fde4bb1abead317f217c636ab6a61dbd7df (diff) |
Add so-simulator project
contribute simulator to onap project
Issue-ID: SO-2463
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I0a3a71fdeb47cbbd686830045a8bc40769102a29
Diffstat (limited to 'common/src/test/java/org')
-rw-r--r-- | common/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/common/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java b/common/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java deleted file mode 100644 index b2db986d02..0000000000 --- a/common/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.onap.so.utils; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.doReturn; -import org.camunda.bpm.client.ExternalTaskClient; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.Spy; -import org.mockito.junit.MockitoJUnitRunner; -import org.springframework.core.env.Environment; - -@RunWith(MockitoJUnitRunner.class) -public class ExternalTaskServiceUtilsTest { - - @Spy - @InjectMocks - private ExternalTaskServiceUtils utils = new ExternalTaskServiceUtils(); - - @Mock - private Environment mockEnv; - - @Mock - private ExternalTaskClient mockClient; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - doReturn("3").when(mockEnv).getProperty("workflow.topics.maxClients", "3"); - doReturn("07a7159d3bf51a0e53be7a8f89699be7").when(mockEnv).getRequiredProperty("mso.msoKey"); - doReturn("6B466C603A260F3655DBF91E53CE54667041C01406D10E8CAF9CC24D8FA5388D06F90BFE4C852052B436").when(mockEnv) - .getRequiredProperty("mso.auth"); - doReturn("someid").when(mockEnv).getRequiredProperty("mso.config.cadi.aafId"); - doReturn("http://camunda.com").when(mockEnv).getRequiredProperty("mso.workflow.endpoint"); - } - - @Test - public void testCreateExternalTaskClient() throws Exception { - ExternalTaskClient actualClient = utils.createExternalTaskClient(); - Assert.assertNotNull(actualClient); - } - - @Test - public void testGetAuth() throws Exception { - String actual = utils.getAuth(); - String expected = "Att32054Life!@"; - assertEquals(expected, actual); - } - - @Test - public void testGetMaxClients() throws Exception { - int actual = utils.getMaxClients(); - int expected = 3; - assertEquals(expected, actual); - } - -} |