Fix the new tosca converter
[clamp.git] / src / test / java / org / onap / clamp / clds / tosca / ToscaYamlToJsonConvertorTestItCase.java
index db6fd5c..a32d499 100644 (file)
@@ -57,7 +57,7 @@ public class ToscaYamlToJsonConvertorTestItCase {
      * Schema.
      *
      * @throws IOException In case of issue when opening the tosca yaml file and
-     *         converted json file
+     *                     converted json file
      */
     @Test
     public final void testParseToscaYaml() throws IOException {
@@ -65,11 +65,11 @@ public class ToscaYamlToJsonConvertorTestItCase {
         ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
 
         String parsedJsonSchema =
-            convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.cdap.tca.hi.lo.app");
+                convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.cdap.tca.hi.lo.app");
         assertNotNull(parsedJsonSchema);
         JSONAssert.assertEquals(
-            ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json.json"),
-            parsedJsonSchema, true);
+                ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json.json"),
+                parsedJsonSchema, true);
     }
 
     /**
@@ -77,20 +77,20 @@ public class ToscaYamlToJsonConvertorTestItCase {
      * based on JSON Editor Schema.
      *
      * @throws IOException In case of issue when opening the tosca yaml file and
-     *         converted json file
+     *                     converted json file
      */
     @Test
     public final void testParseToscaYamlWithConstraints() throws IOException {
         String toscaModelYaml =
-            ResourceFileUtil.getResourceAsString("tosca/tosca-with-constraints.yaml");
+                ResourceFileUtil.getResourceAsString("tosca/tosca-with-constraints.yaml");
         ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
 
         String parsedJsonSchema =
-            convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
+                convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
         assertNotNull(parsedJsonSchema);
         JSONAssert.assertEquals(
-            ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-constraints.json"),
-            parsedJsonSchema, true);
+                ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-constraints.json"),
+                parsedJsonSchema, true);
     }
 
     /**
@@ -98,20 +98,20 @@ public class ToscaYamlToJsonConvertorTestItCase {
      * conversion based on JSON Editor Schema.
      *
      * @throws IOException In case of issue when opening the tosca yaml file and
-     *         converted json file
+     *                     converted json file
      */
     @Test
     public final void testParseToscaYamlWithTypes() throws IOException {
         String toscaModelYaml =
-            ResourceFileUtil.getResourceAsString("tosca/tosca-with-datatypes.yaml");
+                ResourceFileUtil.getResourceAsString("tosca/tosca-with-datatypes.yaml");
         ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
 
         String parsedJsonSchema =
-            convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
+                convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
         assertNotNull(parsedJsonSchema);
         JSONAssert.assertEquals(
-            ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"),
-            parsedJsonSchema, true);
+                ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"),
+                parsedJsonSchema, true);
     }
 
     /**
@@ -119,7 +119,7 @@ public class ToscaYamlToJsonConvertorTestItCase {
      * parameters which defines the Tosca Policy name and its short name.
      *
      * @throws IOException In case of issue when opening the tosca yaml file and
-     *         converted json file
+     *                     converted json file
      */
     @Test
     @Transactional
@@ -165,24 +165,24 @@ public class ToscaYamlToJsonConvertorTestItCase {
         dictionaryService.saveOrUpdateDictionary(dictionaryTest2);
 
         String toscaModelYaml =
-            ResourceFileUtil.getResourceAsString("tosca/tosca_metadata_clamp_possible_values.yaml");
+                ResourceFileUtil.getResourceAsString("tosca/tosca_metadata_clamp_possible_values.yaml");
 
         JsonObject jsonObject = toscaYamlToJsonConvertor.validateAndConvertToJson(toscaModelYaml);
         assertNotNull(jsonObject);
         String policyModelType = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
-            ToscaSchemaConstants.METADATA_POLICY_MODEL_TYPE);
+                ToscaSchemaConstants.METADATA_POLICY_MODEL_TYPE);
         String acronym = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
-            ToscaSchemaConstants.METADATA_ACRONYM);
+                ToscaSchemaConstants.METADATA_ACRONYM);
         String parsedJsonSchema =
-            toscaYamlToJsonConvertor.parseToscaYaml(toscaModelYaml, policyModelType);
+                toscaYamlToJsonConvertor.parseToscaYaml(toscaModelYaml, policyModelType);
 
         assertNotNull(parsedJsonSchema);
         assertEquals("onap.policies.monitoring.cdap.tca.hi.lo.app", policyModelType);
         assertEquals("tca", acronym);
         JSONAssert.assertEquals(
-            ResourceFileUtil
-                .getResourceAsString("tosca/tosca_metadata_clamp_possible_values_json_schema.json"),
-            parsedJsonSchema, true);
+                ResourceFileUtil
+                        .getResourceAsString("tosca/tosca_metadata_clamp_possible_values_json_schema.json"),
+                parsedJsonSchema, true);
     }
 
 }