Refactor REST server tests 05/79805/8
authorJim Hahn <jrh3@att.com>
Wed, 6 Mar 2019 16:03:57 +0000 (11:03 -0500)
committerJim Hahn <jrh3@att.com>
Thu, 7 Mar 2019 14:34:56 +0000 (09:34 -0500)
commit1b801bab1e07f5ca67aa41e5c5e684406a8e3a63
treef1e8687bcf70fb50b32bcbeb93f22161beedd5d1
parent0c5e1571b5ba2d5f5d3941f22b46f13a02f92351
Refactor REST server tests

Refactored the REST server tests so that each controller has
its own test class.
Also ensure things are shutdown by various tests.

Added comments.
Removed unneeded constant.
Updated license.

Modified code that restarts the REST server during tests.

Modified code to just change the activator's "alive" state to
false, leaving the REST server running.

Fixed comment.

Allocated server port.

Removed file that should not have been included.

Changed code to throw exceptions if activator methods are called while
in the wrong state.

Change-Id: I04a3a6654150797c23b3c86a6a39ecf8bb7f5a78
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java
main/src/test/java/org/onap/policy/pap/main/parameters/CommonTestData.java
main/src/test/java/org/onap/policy/pap/main/parameters/TestPapParameterGroup.java
main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pap/main/rest/TestHealthCheckRestControllerV1.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pap/main/rest/TestPapRestServer.java [deleted file]
main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pap/main/startstop/TestMain.java
main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java
main/src/test/resources/parameters/PapConfigParameters.json
main/src/test/resources/parameters/PapConfigParameters_Https.json [deleted file]