Port to JUnit 4.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1185695 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2011-10-18 14:47:48 +00:00
parent 41e61322d6
commit d0ea299cdf
1 changed files with 16 additions and 6 deletions

View File

@ -16,89 +16,99 @@
*/
package org.apache.commons.lang3.builder;
import junit.framework.TestCase;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/**
* Test case for ToStringStyle.
*
* @version $Id$
*/
public class ToStringStyleTest extends TestCase {
public ToStringStyleTest(String name) {
super(name);
}
public class ToStringStyleTest {
private static class ToStringStyleImpl extends ToStringStyle {
}
//-----------------------------------------------------------------------
@Test
public void testSetArrayStart() {
ToStringStyle style = new ToStringStyleImpl();
style.setArrayStart(null);
assertEquals("", style.getArrayStart());
}
@Test
public void testSetArrayEnd() {
ToStringStyle style = new ToStringStyleImpl();
style.setArrayEnd(null);
assertEquals("", style.getArrayEnd());
}
@Test
public void testSetArraySeparator() {
ToStringStyle style = new ToStringStyleImpl();
style.setArraySeparator(null);
assertEquals("", style.getArraySeparator());
}
@Test
public void testSetContentStart() {
ToStringStyle style = new ToStringStyleImpl();
style.setContentStart(null);
assertEquals("", style.getContentStart());
}
@Test
public void testSetContentEnd() {
ToStringStyle style = new ToStringStyleImpl();
style.setContentEnd(null);
assertEquals("", style.getContentEnd());
}
@Test
public void testSetFieldNameValueSeparator() {
ToStringStyle style = new ToStringStyleImpl();
style.setFieldNameValueSeparator(null);
assertEquals("", style.getFieldNameValueSeparator());
}
@Test
public void testSetFieldSeparator() {
ToStringStyle style = new ToStringStyleImpl();
style.setFieldSeparator(null);
assertEquals("", style.getFieldSeparator());
}
@Test
public void testSetNullText() {
ToStringStyle style = new ToStringStyleImpl();
style.setNullText(null);
assertEquals("", style.getNullText());
}
@Test
public void testSetSizeStartText() {
ToStringStyle style = new ToStringStyleImpl();
style.setSizeStartText(null);
assertEquals("", style.getSizeStartText());
}
@Test
public void testSetSizeEndText() {
ToStringStyle style = new ToStringStyleImpl();
style.setSizeEndText(null);
assertEquals("", style.getSizeEndText());
}
@Test
public void testSetSummaryObjectStartText() {
ToStringStyle style = new ToStringStyleImpl();
style.setSummaryObjectStartText(null);
assertEquals("", style.getSummaryObjectStartText());
}
@Test
public void testSetSummaryObjectEndText() {
ToStringStyle style = new ToStringStyleImpl();
style.setSummaryObjectEndText(null);