diff options
Diffstat (limited to 'csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java')
-rw-r--r-- | csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java index d7370e4..b29470c 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java @@ -29,23 +29,20 @@ import static org.assertj.core.api.Assertions.assertThat; public class PnfCSARArchiveTest { @Test - public void shouldUseDataStoredInManifestMfFileToConfigurePnfCSARArchive() throws IOException, URISyntaxException { + public void shouldUseDataStoredInManifestMfFileToConfigurePnfCSARArchive() throws Exception { // given String fileName = PnfCSARArchiveTest.class.getClassLoader().getResource("pnf/dummyPnfv2.csar") .toURI().getPath(); - PnfCSARArchive pnfCSARArchive = new PnfCSARArchive(); - pnfCSARArchive.init(fileName); // when - try { + try( PnfCSARArchive pnfCSARArchive = new PnfCSARArchive()) { + pnfCSARArchive.init(fileName); pnfCSARArchive.parse(); - }finally { - pnfCSARArchive.cleanup(); + // then + verifyThatMetadataWasSet(pnfCSARArchive); + verifyThatNonManoArtifactsWereSet(pnfCSARArchive); } - // then - verifyThatMetadataWasSet(pnfCSARArchive); - verifyThatNonManoArtifactsWereSet(pnfCSARArchive); } private void verifyThatNonManoArtifactsWereSet(PnfCSARArchive pnfCSARArchive) { |