summaryrefslogtreecommitdiffstats
path: root/models-sim/policy-models-simulators/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-02-12 09:26:24 -0500
committerJim Hahn <jrh3@att.com>2021-02-12 12:43:43 -0500
commit222018349b49d229fc95a3939f4eaad3a3b663a8 (patch)
treed1c0377d00269bcb3cfc3c702e8a86c350107ed5 /models-sim/policy-models-simulators/src/test
parentec348b97648f1e927365d17d376495bbd2b39c67 (diff)
More sonars in models
Addressed the following issues: - change visibility of constructor - assert exception type Issue-ID: POLICY-2905 Change-Id: Iaededb32802e4facbbc776ae51d05d2ef5c60b93 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/policy-models-simulators/src/test')
-rw-r--r--models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
index f5598e2e1..1f52ed124 100644
--- a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
+++ b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -242,7 +242,8 @@ public class MainTest {
*/
@Test
public void testBuildTopicServerInvalidProvider() {
- assertThatThrownBy(() -> new Main("invalidTopicServer.json").start());
+ assertThatThrownBy(() -> new Main("invalidTopicServer.json").start())
+ .hasCauseInstanceOf(IllegalArgumentException.class);
}
/**
@@ -250,7 +251,8 @@ public class MainTest {
*/
@Test
public void testBuildTopicServerNoSink() {
- assertThatThrownBy(() -> new Main("missingSink.json").start());
+ assertThatThrownBy(() -> new Main("missingSink.json").start())
+ .hasCauseInstanceOf(IllegalArgumentException.class);
}
/**
@@ -258,6 +260,7 @@ public class MainTest {
*/
@Test
public void testBuildTopicServerNoSource() {
- assertThatThrownBy(() -> new Main("missingSource.json").start());
+ assertThatThrownBy(() -> new Main("missingSource.json").start())
+ .hasCauseInstanceOf(IllegalArgumentException.class);
}
}