1 package org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation;
 
   3 import org.junit.Before;
 
   5 import org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.TestConstants;
 
   6 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest;
 
   8 import java.io.IOException;
 
  10 public class FunctionTranslationGetAttrImplTest extends BaseResourceTranslationTest {
 
  14   public void setUp() throws IOException {
 
  15     // do not delete this function. it prevents the superclass setup from running
 
  19   public void testTranslateGetAtt() throws Exception {
 
  21         "/mock/services/heattotosca/getAttr/getAttrUC/inputfiles";
 
  23         "/mock/services/heattotosca/getAttr/getAttrUC/expectedoutputfiles";
 
  24     initTranslatorAndTranslate();
 
  26     validateGetAttribute(TestConstants.TEST_GET_ATTR_FOR_MORE_THAN_ONE_ATTR_IN_ATTR_LIST);
 
  30   public void testTranslateGetAttUnsupportedResource() throws Exception {
 
  32         "/mock/services/heattotosca/getAttr/getAttrUnsupportedResource/inputfiles";
 
  34         "/mock/services/heattotosca/getAttr/getAttrUnsupportedResource/expectedoutputfiles";
 
  35     initTranslatorAndTranslate();
 
  37     validateGetAttribute(TestConstants.TEST_IGNORE_GET_ATTR_FROM_OUTPUT);
 
  41   public void testTranslateGetAttUnsupportedAttr() throws Exception {
 
  43         "/mock/services/heattotosca/getAttr/getAttrUnsupportedAttr/inputfiles";
 
  45         "/mock/services/heattotosca/getAttr/getAttrUnsupportedAttr/expectedoutputfiles";
 
  46     initTranslatorAndTranslate();
 
  48     validateGetAttribute(TestConstants.TEST_GET_ATTR_FOR_NOT_SUPPORTED_ATTR_IN_ATTR_LIST);
 
  52   public void testTranslateGetAttNestedAttr() throws Exception {
 
  54         "/mock/services/heattotosca/getAttrNestedAtt/inputfiles";
 
  56         "/mock/services/heattotosca/getAttrNestedAtt/expectedoutputfiles";
 
  57     initTranslatorAndTranslate();
 
  62   public void testTranslateGetAttDynamicParam() throws Exception {
 
  64         "/mock/services/heattotosca/getAttrDynamicParam/inputfiles";
 
  66         "/mock/services/heattotosca/getAttrDynamicParam/expectedoutputfiles";
 
  67     initTranslatorAndTranslate();
 
  69     validateGetAttribute(TestConstants.TEST_OUTPUT_GET_ATTR);
 
  73   public void testTranslateGetAttOnlyResourceName() throws Exception {
 
  75         "/mock/services/heattotosca/getAttr/getAttrOnlyResourceName/inputfiles";
 
  77         "/mock/services/heattotosca/getAttr/getAttrOnlyResourceName/expectedoutputfiles";
 
  78     initTranslatorAndTranslate();
 
  80     validateGetAttribute(TestConstants.TEST_GET_ATTR_FOR_ONLY_RESOURCE_NAME);
 
  84   public void testTranslateGetAttNonePortOrCompute() throws Exception {
 
  86         "/mock/services/heattotosca/buildconsolidationdata/getattribute/noneToPortOrCompute/inputs";
 
  88         "/mock/services/heattotosca/buildconsolidationdata/getattribute/noneToPortOrCompute/expectedoutputfiles";
 
  89     initTranslatorAndTranslate();
 
  91     validateGetAttribute(TestConstants.TEST_GET_ATTR_FOR_NONE_TO_PORT_OR_COMPUTE);
 
  95   public void testTranslateDynamicGetAttrWithEmptyMapDefaultValue() throws IOException {
 
  97         "/mock/services/heattotosca/getAttrDynamicParamEmptyMap/inputs";
 
  99         "/mock/services/heattotosca/getAttrDynamicParamEmptyMap/expectedoutputfiles";
 
 100     initTranslatorAndTranslate();