[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / test / java / org / openecomp / sdc / vendorsoftwareproduct / informationartifact / InformationArtifactGeneratorImplTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 //package org.openecomp.sdc.vendorsoftwareproduct.informationartifact;
22 //
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;
33 //
34 //import java.io.File;
35 //import java.io.IOException;
36 //
37 //import static org.testng.Assert.*;
38 //
39 ///**
40 // * Created by Talio on 12/6/2016.
41 // */
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";
48 //
49 //
50 //  @BeforeClass
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();
58 //  }
59 //
60 //  @Test
61 //  public void testDownloadInformationArtifact() throws IOException {
62 //    File informationArtifact =
63 //        vendorSoftwareProductManager.getInformationArtifact(vspId, vspActiveVersion, USER1);
64 //
65 //    Assert.assertNotNull(informationArtifact);
66 //  }
67 //
68 //  @Test
69 //  public void negativeTestDownloadInformationArtifactOnNoneExistiongVsp() throws IOException {
70 //    try {
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.");
76 //    }
77 //  }
78 //
79 //}