2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 //package org.openecomp.sdc.vendorsoftwareproduct.informationartifact;
23 //import org.openecomp.core.util.UniqueValueUtil;
24 //import org.openecomp.sdc.vendorsoftwareproduct.utils.VSPCommon;
25 //import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
26 //import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
27 //import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
28 //import org.openecomp.sdc.vendorsoftwareproduct.impl.VendorSoftwareProductManagerImpl;
29 //import org.openecomp.sdc.versioning.dao.types.Version;
30 //import org.testng.Assert;
31 //import org.testng.annotations.BeforeClass;
32 //import org.testng.annotations.Test;
34 //import java.io.File;
35 //import java.io.IOException;
37 //import static org.testng.Assert.*;
40 // * Created by Talio on 12/6/2016.
42 //public class InformationArtifactGeneratorImplTest {
43 // private static VendorSoftwareProductManager vendorSoftwareProductManager =
44 // new VendorSoftwareProductManagerImpl();
45 // private static String vspId;
46 // private static Version vspActiveVersion;
47 // private static final String USER1 = "vspTestUser1";
51 // public void init(){
52 // UniqueValueUtil.deleteUniqueValue(VendorSoftwareProductConstants.UniqueValues.VENDOR_SOFTWARE_PRODUCT_NAME, "Test_download_info");
53 // VspDetails vspDetails = vendorSoftwareProductManager.createVsp
54 // (VSPCommon.createVspDetails(null, null, "Test_download_info", "Test-vsp-empty",
55 // "vendorName", "vlm1Id", "icon", "category", "subCategory", "123", null), USER1);
56 // vspId = vspDetails.getId();
57 // vspActiveVersion = vspDetails.getVersion();
61 // public void testDownloadInformationArtifact() throws IOException {
62 // File informationArtifact =
63 // vendorSoftwareProductManager.getInformationArtifact(vspId, vspActiveVersion, USER1);
65 // Assert.assertNotNull(informationArtifact);
69 // public void negativeTestDownloadInformationArtifactOnNoneExistiongVsp() throws IOException {
71 // File informationArtifact = vendorSoftwareProductManager
72 // .getInformationArtifact("non_existing_id", vspActiveVersion, USER1);
73 // }catch(Exception e){
74 // Assert.assertEquals(e.getMessage(), "Versionable entity VendorSoftwareProduct with id " +
75 // "non_existing_id does not exist.");