diff options
author | 2019-03-25 13:46:06 +0000 | |
---|---|---|
committer | 2019-03-25 13:46:06 +0000 | |
commit | d34c02725d33d4b9cfa3ac70742b47be65b31066 (patch) | |
tree | ce03c44c382357155aac9c1c0e6f96ccddc5d47a /csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java | |
parent | 873fbb49dcd3092d2591a4eca13470713ca443ea (diff) | |
parent | 5873269dcf426377a037e28a0b16bd18af582a7e (diff) |
Merge "PNF TC R293901"
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) { |