summaryrefslogtreecommitdiffstats
path: root/ui-ci
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2019-10-15 10:23:08 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-01-26 09:17:08 +0000
commitcb7a00bf89efca5b784120e990f79c475347e89d (patch)
tree2e434c227f7ac2bf3ba024f9496ded1f399554b9 /ui-ci
parentc113cc3f10f72013a66c2eb5a52ab8460da196f9 (diff)
Increase junit TCs
1. Re-enable disabled TCs (enable = true) 2. Enable @Ignored TCs 3. Add some Assert when missing 4. Remove old unused TCs (covered in UI) Change-Id: I900e52f4860b1fdc5bd1e529a1fe7f5c3491465b Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2672
Diffstat (limited to 'ui-ci')
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java2
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java6
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java2
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfAPI.java8
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java2
5 files changed, 10 insertions, 10 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java
index b1a5b5060e..5dd7412666 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java
@@ -103,7 +103,7 @@ public class AdminUserManagment extends SetupCDTest {
// design changed and now one letter user should exist
//TC922253
- @Test(enabled = false)
+ @Test(enabled = true)
public void createInvalidMacIdTest() {
ExtentTestActions.log(Status.INFO, "Open bug 324032");
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java
index f9cb233448..5e240c025b 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java
@@ -289,7 +289,7 @@ public class ImportDCAE extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void addUpdateDeleteSimplePropertiesToDCAEAssetTest() throws Exception {
createDCAEAsset();
@@ -313,7 +313,7 @@ public class ImportDCAE extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void DCAEAssetInstancesInputScreenTest() throws Exception {
createDCAEAsset();
@@ -454,7 +454,7 @@ public class ImportDCAE extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void addPropertyInCompositionScreenDCAEAssetTest() throws Exception {
createDCAEAsset();
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
index fc4dd88185..df94a14b58 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
@@ -569,7 +569,7 @@ public class Service extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void inputsTest() throws Exception {
String fileName = "service_input_test_VF2.csar";
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfAPI.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfAPI.java
index fe6718eea2..accea723b8 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfAPI.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfAPI.java
@@ -340,7 +340,7 @@ public class VfAPI extends SetupCDTest {
}*/
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void addUpdateDeleteSimplePropertiesToVfTest() throws Exception {
ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
ResourceUIUtils.createVF(vfMetaData, getUser());
@@ -366,7 +366,7 @@ public class VfAPI extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void vfcInstancesInputScreenTest() throws Exception {
ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
ResourceUIUtils.createVF(vfMetaData, getUser());
@@ -450,7 +450,7 @@ public class VfAPI extends SetupCDTest {
VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());
}
- @Test(enabled = false)
+ @Test(enabled = true)
public void testDownload() throws Exception {
// ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
// ResourceUIUtils.createResource(vfMetaData, getUser());
@@ -542,7 +542,7 @@ public class VfAPI extends SetupCDTest {
}
// future removed from ui
- @Test(enabled = false)
+ @Test(enabled = true)
public void addPropertyInCompositionScreenTest() throws Exception {
ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
ResourceUIUtils.createVF(vfMetaData, getUser());
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java
index f0d9d720ef..4523571085 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java
@@ -204,7 +204,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest {
// TC1438232 - Import VF Artifacts - Informational Artifacts - Artifact Name To Long
// TODO: make informational artifact name longer then 255
// TODO: windows/linux not allowed it
- @Test(enabled = false)
+ @Test(enabled = true)
public void importVfArtifactsInformationalArtifactsArtifactNameToLong() throws Exception {
String folder = "US825779";
ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright © 2016-2018 European Support Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.openecomp.sdcrests.vendorlicense.rest.mapping;

import org.junit.Test;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
import org.openecomp.sdcrests.vendorlicense.types.EntitlementPoolRequestDto;
import org.openecomp.sdcrests.vendorlicense.types.MultiChoiceOrOtherDto;

import java.util.Collections;
import java.util.HashSet;

import static org.testng.Assert.assertEquals;


public class MapEntitlementPoolRequestDtoToEntitlementPoolEntityTest {

    @Test
    public void testExpiryDate() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "2d9bd40d-9b86-4621-a0b3-015cc65ed29f";
        source.setExpiryDate(param);
        mapper.doMapping(source, target);
        assertEquals(target.getExpiryDate(), param);
    }

    @Test
    public void testName() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "08c72f48-2cb6-4509-9983-5564c74c1bc8";
        source.setName(param);
        mapper.doMapping(source, target);
        assertEquals(target.getName(), param);
    }

    @Test
    public void testDescription() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "b5161f7b-b5bc-4e98-b242-a8dc99aeab01";
        source.setDescription(param);
        mapper.doMapping(source, target);
        assertEquals(target.getDescription(), param);
    }

    @Test
    public void testThresholdValue() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        Integer param = -767970235;
        source.setThresholdValue(param);
        mapper.doMapping(source, target);
        assertEquals(target.getThresholdValue(), param);
    }

    @Test
    public void testIncrements() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "3b760eff-6407-44b7-a1f2-2a87b432f094";
        source.setIncrements(param);
        mapper.doMapping(source, target);
        assertEquals(target.getIncrements(), param);
    }

    @Test
    public void testOperationalScope() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        MultiChoiceOrOtherDto<OperationalScope> param = new MultiChoiceOrOtherDto<>();
        param.setChoices(new HashSet(Collections.singletonList(TestEnum.Yes)));
        source.setOperationalScope(param);
        mapper.doMapping(source, target);
        assertEquals(target.getOperationalScope().getChoices(), param.getChoices());
    }

    @Test
    public void testStartDate() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper =
                new MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "654f3536-9346-45fb-97f5-6dc24e517e31";
        source.setStartDate(param);
        mapper.doMapping(source, target);
        assertEquals(target.getStartDate(), param);
    }

    @Test
    public void testManufacturerReferenceNumber() {
        EntitlementPoolRequestDto source = new EntitlementPoolRequestDto();
        EntitlementPoolEntity target = new EntitlementPoolEntity();
        MapEntitlementPoolRequestDtoToEntitlementPoolEntity mapper = new
            MapEntitlementPoolRequestDtoToEntitlementPoolEntity();
        String param = "02402e1e-7092-485a-9574-46e2d49cca97";
        source.setManufacturerReferenceNumber(param);
        mapper.doMapping(source, target);
        assertEquals(target.getManufacturerReferenceNumber(), param);
    }

    enum TestEnum {
        Yes
    }
}