summaryrefslogtreecommitdiffstats
path: root/tools/tools-common/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-06-19 17:04:51 +0100
committerliamfallon <liam.fallon@est.tech>2020-06-19 17:05:05 +0100
commit9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch)
tree4224dadcc265e2980a6f097976a3beb34ce14e93 /tools/tools-common/src/test
parent73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (diff)
Changes for checkstyle 8.32
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'tools/tools-common/src/test')
-rw-r--r--tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java20
-rw-r--r--tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java2
2 files changed, 11 insertions, 11 deletions
diff --git a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
index 36c64e517..abc01b5e3 100644
--- a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
+++ b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
@@ -17,14 +17,16 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.tools.common;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.Path;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -36,15 +38,15 @@ public class OutputFileTest {
File file = fp.toFile();
@Before
- public void setUp() {
- if (file.exists()){
+ public void beforeSetUp() {
+ if (file.exists()) {
file.delete();
}
}
@Test
public void testToWriter() {
- OutputFile testFile = new OutputFile(testFileName,false);
+ OutputFile testFile = new OutputFile(testFileName, false);
testFile.validate();
file.setReadable(false);
file.setWritable(false);
@@ -55,19 +57,19 @@ public class OutputFileTest {
@Test
public void testValidate() {
- OutputFile testFile = new OutputFile(testFileName,true);
+ OutputFile testFile = new OutputFile(testFileName, true);
assertNull(testFile.validate());
file.setReadable(false);
file.setWritable(false);
assertNotNull(testFile.validate());
OutputFile testFile2 = new OutputFile(testFileName);
assertNotNull(testFile2.validate());
- assertEquals("file already exists",testFile2.validate());
+ assertEquals("file already exists", testFile2.validate());
}
@Test
public void testToOutputStream() {
- OutputFile testFile = new OutputFile(testFileName,true);
+ OutputFile testFile = new OutputFile(testFileName, true);
assertNotNull(testFile.toOutputStream());
file.setReadable(false);
file.setWritable(false);
@@ -76,7 +78,7 @@ public class OutputFileTest {
@After
public void testDown() {
- if (file.exists()){
+ if (file.exists()) {
file.delete();
}
}
diff --git a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
index 723ad8739..797c7c1e8 100644
--- a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
+++ b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
@@ -32,12 +32,10 @@ package org.onap.policy.apex.tools.common.docs;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
import org.junit.Test;
-
//tag::import[]
import org.onap.policy.apex.tools.common.CliOptions;
import org.onap.policy.apex.tools.common.CliParser;
//end::import[]
-
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;