summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-02-12 16:49:30 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-02-13 15:47:22 +0000
commit563772ec9a100e9eb46fff1b5087985dbe07d04a (patch)
tree0368036088a9c46f54f3f2ed566f1c665edee084 /src/test/java/org/onap
parente4fab0c8c5928a876c46a6ae91d36ee2a0d41278 (diff)
Add a topic protocol configuration setting
Use the latest version of the event-client for DMaaP. Read an (optional) protocol value from each topic configuration properties file, and pass this to the Consumer and/or Publisher. Use the default protocol if the configuration is not supplied. Change-Id: I3d6264e1f32c1fbba097eafbe7fe7fbd744f1373 Issue-ID: AAI-2150 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r--src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
index 604312e..86da99e 100644
--- a/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
+++ b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
@@ -1,19 +1,22 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-2019 European Software Marketing Ltd.
+ * ================================================================================
* 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
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.publisher;
@@ -22,12 +25,6 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import org.onap.aai.event.client.DMaaPEventPublisher;
-import org.onap.aai.validation.config.TopicAdminConfig;
-import org.onap.aai.validation.config.TopicConfig;
-import org.onap.aai.validation.config.TopicConfig.Topic;
-import org.onap.aai.validation.factory.DMaaPEventPublisherFactory;
-import org.onap.aai.validation.publisher.ValidationEventPublisher;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -37,14 +34,17 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.aai.event.client.DMaaPEventPublisher;
+import org.onap.aai.validation.config.TopicAdminConfig;
+import org.onap.aai.validation.config.TopicConfig;
+import org.onap.aai.validation.config.TopicConfig.Topic;
+import org.onap.aai.validation.factory.DMaaPEventPublisherFactory;
@RunWith(MockitoJUnitRunner.class)
public class TestValidationEventPublisher {
static {
System.setProperty("APP_HOME", ".");
- System.setProperty("consumer.topic.names", "poa-rule-validation");
- System.setProperty("publisher.topic.names", "poa-audit-result");
}
private DMaaPEventPublisher mockEventPublisher;
@@ -73,7 +73,7 @@ public class TestValidationEventPublisher {
when(mockEventPublisher.closeWithUnsent()).thenReturn(new ArrayList<>());
DMaaPEventPublisherFactory mockEventPublisherFactory = Mockito.mock(DMaaPEventPublisherFactory.class);
- when(mockEventPublisherFactory.createEventPublisher(any(), any(), any(), any(), any()))
+ when(mockEventPublisherFactory.createEventPublisher(any(), any(), any(), any(), any(), any()))
.thenReturn(mockEventPublisher);
validationEventPublisher.setEventPublisherFactory(mockEventPublisherFactory);