package org.onap.aai.modelloader.service;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Base64;
+
import javax.ws.rs.core.Response;
+
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
@Test
public void testMissingConfig() {
new ModelLoaderService().start();
+ assertTrue(true);
}
-
+
@Test
public void testLoadModel() {
Response response = service.loadModel("");
public void testIngestModelMissingName() throws IOException {
byte[] csarPayload = new ArtifactTestUtils().loadResource("compressedArtifacts/service-VscpaasTest-csar.csar");
Response response = service.ingestModel("", "", Base64.getEncoder().encodeToString(csarPayload));
- assertThat(response.getStatus(), is(Response.Status.OK.getStatusCode()));
+ assertThat(response.getStatus(), is(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()));
}
}