From 5873269dcf426377a037e28a0b16bd18af582a7e Mon Sep 17 00:00:00 2001 From: Bogumil Zebek Date: Tue, 19 Mar 2019 09:59:02 +0100 Subject: PNF TC R293901 Change-Id: I6acfa94ce0fac2b3c46688601c3ec553af4c8b66 Issue-ID: VNFSDK-386 Signed-off-by: Zebek Bogumil --- .../test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java') 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) { -- cgit 1.2.3-korg