- System.setProperty(GeneratorConstants.PROPERTY_ARTIFACT_GENERATOR_CONFIG_FILE,
- new ArtifactTestUtils().getResourcePath("artifact-generator.properties"));
+ new ArtifactTestUtils().setGeneratorSystemProperties();
+
+ }
+
+ @Test
+ public void testGenerateArtifacts() throws Exception {
+ Response response = processJsonRequest(CsarTest.VNF_VENDOR_CSAR);
+ assertThat(response.getStatus(), is(Response.Status.OK.getStatusCode()));
+ assertThat(response.getEntity(), is(getResponseJson("response.json")));
+ }
+
+ /**
+ * No VNF Configuration exists.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testGenerateArtifactsWithoutVnfConfiguration() throws Exception {
+ Response response = processJsonRequest(CsarTest.NO_VNF_CONFIG_CSAR);
+ assertThat(response.getStatus(), is(Response.Status.OK.getStatusCode()));
+ assertThat(response.getEntity(), is(getResponseJson("validNoVnfConfigurationResponse.json")));