Skip to content

Commit

Permalink
Turn ‘IndentingWriterTests’ into a unit test class
Browse files Browse the repository at this point in the history
(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 36d2840
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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();
Expand All @@ -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);
Expand Down
1 change: 0 additions & 1 deletion framework/base/testdef/basetests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down

0 comments on commit 36d2840

Please sign in to comment.