Skip to content
Permalink
Browse files

Turn ‘IndentingWriterTests’ into a unit test class

(OFBIZ-11067)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859979 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 25, 2019
1 parent 10a8ad3 commit 36d284097e051c7c68e448c3f18e5c9d160c6923
@@ -1,4 +1,4 @@
/*******************************************************************************
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -15,30 +15,18 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.base.util.test;
*/
package org.apache.ofbiz.base.util;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;

import java.io.StringWriter;

import org.apache.ofbiz.base.lang.SourceMonitored;
import org.apache.ofbiz.base.test.GenericTestCaseBase;
import org.apache.ofbiz.base.util.IndentingWriter;
import org.junit.Test;

@SourceMonitored
public class IndentingWriterTests extends GenericTestCaseBase {
public IndentingWriterTests(String name) {
super(name);
}

@Override
protected void setUp() throws Exception {
super.setUp();
}

@Override
protected void tearDown() throws Exception {
super.tearDown();
}
public class IndentingWriterTests {

private static void doTest(String label, boolean doSpace, boolean doNewline, String wanted) throws Exception {
StringWriter sw = new StringWriter();
@@ -61,6 +49,7 @@ private static void doTest(String label, boolean doSpace, boolean doNewline, Str
assertEquals(label, wanted, sw.toString());
}

@Test
public void testIndentingWriter() throws Exception {
StringWriter sw = new StringWriter();
IndentingWriter iw = IndentingWriter.makeIndentingWriter(sw);
@@ -23,7 +23,6 @@
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
<test-group case-name="basetests">
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.AssertTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.IndentingWriterTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.ObjectTypeTests"/>
<!--junit-test-suite class-name="org.apache.ofbiz.base.util.test.ReferenceCleanerTests"/-->
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilMiscTests"/>

0 comments on commit 36d2840

Please sign in to comment.
You can’t perform that action at this time.