summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorsu622b <sunil.unnava@att.com>2018-03-19 16:46:51 -0400
committersu622b <sunil.unnava@att.com>2018-03-19 16:47:12 -0400
commitbd9c085e11b6c735cd674599454e44f00b708400 (patch)
treec45d8fcb1f9a1b3272dceaacb636359a132d23f2 /src/test
parent2815416d16d9b2f28a0e7c71ce84e487c18c387b (diff)
changes for deployment errors
Issue-ID: DMAAP-332 Change-Id: I740d03e88dd5104806c5302a01fd579a7c280b5c Signed-off-by: su622b <sunil.unnava@att.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/att/nsa/cambria/service/impl/TopicServiceImplTest.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/test/java/com/att/nsa/cambria/service/impl/TopicServiceImplTest.java b/src/test/java/com/att/nsa/cambria/service/impl/TopicServiceImplTest.java
index 2341a7f..c90ba54 100644
--- a/src/test/java/com/att/nsa/cambria/service/impl/TopicServiceImplTest.java
+++ b/src/test/java/com/att/nsa/cambria/service/impl/TopicServiceImplTest.java
@@ -134,9 +134,9 @@ public class TopicServiceImplTest {
@Test(expected = DMaaPAccessDeniedException.class)
public void testCreateTopicWithEnforcedName()
throws DMaaPAccessDeniedException, CambriaApiException, IOException, TopicExistsException {
-
+
+ PowerMockito.when(DMaaPAuthenticatorImpl.isIgnoreAuth()).thenReturn(true);
Assert.assertNotNull(topicService);
-
PowerMockito.mockStatic(PropertiesMapBean.class);
when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "enforced.topic.name.AAF"))
@@ -150,7 +150,6 @@ public class TopicServiceImplTest {
TopicBean topicBean = new TopicBean();
topicBean.setTopicName("enfTopicNamePlusExtra");
-
topicService.createTopic(dmaapContext, topicBean);
}
@@ -201,7 +200,8 @@ public class TopicServiceImplTest {
@Test(expected = DMaaPAccessDeniedException.class)
public void testCreateTopicNoUserInContextAndNoAuthHeader()
throws DMaaPAccessDeniedException, CambriaApiException, IOException, TopicExistsException {
-
+
+ PowerMockito.when(DMaaPAuthenticatorImpl.isIgnoreAuth()).thenReturn(true);
Assert.assertNotNull(topicService);
PowerMockito.mockStatic(PropertiesMapBean.class);
@@ -218,14 +218,14 @@ public class TopicServiceImplTest {
TopicBean topicBean = new TopicBean();
topicBean.setTopicName("enfTopicNamePlusExtra");
-
topicService.createTopic(dmaapContext, topicBean);
}
@Test(expected = DMaaPAccessDeniedException.class)
public void testCreateTopicNoUserInContextAndAuthHeaderAndPermitted()
throws DMaaPAccessDeniedException, CambriaApiException, IOException, TopicExistsException {
-
+
+ PowerMockito.when(DMaaPAuthenticatorImpl.isIgnoreAuth()).thenReturn(true);
Assert.assertNotNull(topicService);
PowerMockito.mockStatic(PropertiesMapBean.class);
@@ -245,7 +245,6 @@ public class TopicServiceImplTest {
TopicBean topicBean = new TopicBean();
topicBean.setTopicName("enfTopicNamePlusExtra");
-
topicService.createTopic(dmaapContext, topicBean);
}