summaryrefslogtreecommitdiffstats
path: root/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
diff options
context:
space:
mode:
Diffstat (limited to 'common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java')
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
index e24f1c8e..66656844 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,13 +23,11 @@ package org.onap.policy.common.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
-
import org.junit.Test;
import org.onap.policy.common.parameters.testclasses.TestParametersL00;
import org.yaml.snakeyaml.Yaml;
@@ -38,15 +37,10 @@ public class TestYamlInput {
public void testYamlInput() throws IOException {
TestParametersL00 testParameterGroup = null;
- // Read the parameters
- try {
- // Read the parameters from JSON using Gson
- final Yaml yaml = new Yaml();
- testParameterGroup = yaml.loadAs(new FileReader("src/test/resources/parameters/TestParameters.yaml"),
- TestParametersL00.class);
- } catch (final Exception e) {
- fail("test should not throw an exception here: " + e.getMessage());
- }
+ // Read the parameters from JSON using Gson
+ final Yaml yaml = new Yaml();
+ testParameterGroup = yaml.loadAs(new FileReader("src/test/resources/parameters/TestParameters.yaml"),
+ TestParametersL00.class);
GroupValidationResult validationResult = testParameterGroup.validate();
assertTrue(validationResult.isValid());