summaryrefslogtreecommitdiffstats
path: root/main/src/test/java
diff options
context:
space:
mode:
authorjrh3 <jrh3@att.com>2019-09-12 14:34:30 -0400
committerjrh3 <jrh3@att.com>2019-09-12 15:28:41 -0400
commitba11c9a1e41384fd065d4cb21beab3182651a066 (patch)
tree2c32ac274cab2585575846ab032f615d1f0d0ce5 /main/src/test/java
parentad55e1eb6653c9b0ee9f68271b7bb2dc766a2c47 (diff)
Add yaml support to pap rest server
Change-Id: I3e3d5c46bfa4f1d093e64b8be9a9720570e6000c Issue-ID: POLICY-2085 Signed-off-by: jrh3 <jrh3@att.com>
Diffstat (limited to 'main/src/test/java')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
index 317ab1c1..d8e6963f 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
@@ -20,10 +20,13 @@
package org.onap.policy.pap.main.rest;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import org.junit.Before;
@@ -41,6 +44,14 @@ public class PapRestControllerV1Test {
}
@Test
+ public void testProduces() {
+ Produces annotation = PapRestControllerV1.class.getAnnotation(Produces.class);
+ assertNotNull(annotation);
+ assertThat(annotation.value()).contains(MediaType.APPLICATION_JSON)
+ .contains(PapRestControllerV1.APPLICATION_YAML);
+ }
+
+ @Test
public void testAddVersionControlHeaders() {
Response resp = ctlr.addVersionControlHeaders(bldr).build();
assertEquals("0", resp.getHeaderString(PapRestControllerV1.VERSION_MINOR_NAME));