1 16 package org.apache.commons.lang.builder; 17 18 import junit.framework.Test; 19 import junit.framework.TestCase; 20 import junit.framework.TestSuite; 21 import junit.textui.TestRunner; 22 23 29 public class ToStringStyleTest extends TestCase { 30 31 public ToStringStyleTest(String name) { 32 super(name); 33 } 34 35 public static void main(String [] args) { 36 TestRunner.run(suite()); 37 } 38 39 public static Test suite() { 40 TestSuite suite = new TestSuite(ToStringStyleTest.class); 41 suite.setName("ToStringStyle Tests"); 42 return suite; 43 } 44 45 protected void setUp() throws Exception { 46 super.setUp(); 47 } 48 49 private static class ToStringStyleImpl extends ToStringStyle { 50 } 51 52 public void testSetArrayStart() { 54 ToStringStyle style = new ToStringStyleImpl(); 55 style.setArrayStart(null); 56 assertEquals("", style.getArrayStart()); 57 } 58 59 public void testSetArrayEnd() { 60 ToStringStyle style = new ToStringStyleImpl(); 61 style.setArrayEnd(null); 62 assertEquals("", style.getArrayEnd()); 63 } 64 65 public void testSetArraySeparator() { 66 ToStringStyle style = new ToStringStyleImpl(); 67 style.setArraySeparator(null); 68 assertEquals("", style.getArraySeparator()); 69 } 70 71 public void testSetContentStart() { 72 ToStringStyle style = new ToStringStyleImpl(); 73 style.setContentStart(null); 74 assertEquals("", style.getContentStart()); 75 } 76 77 public void testSetContentEnd() { 78 ToStringStyle style = new ToStringStyleImpl(); 79 style.setContentEnd(null); 80 assertEquals("", style.getContentEnd()); 81 } 82 83 public void testSetFieldNameValueSeparator() { 84 ToStringStyle style = new ToStringStyleImpl(); 85 style.setFieldNameValueSeparator(null); 86 assertEquals("", style.getFieldNameValueSeparator()); 87 } 88 89 public void testSetFieldSeparator() { 90 ToStringStyle style = new ToStringStyleImpl(); 91 style.setFieldSeparator(null); 92 assertEquals("", style.getFieldSeparator()); 93 } 94 95 public void testSetNullText() { 96 ToStringStyle style = new ToStringStyleImpl(); 97 style.setNullText(null); 98 assertEquals("", style.getNullText()); 99 } 100 101 public void testSetSizeStartText() { 102 ToStringStyle style = new ToStringStyleImpl(); 103 style.setSizeStartText(null); 104 assertEquals("", style.getSizeStartText()); 105 } 106 107 public void testSetSizeEndText() { 108 ToStringStyle style = new ToStringStyleImpl(); 109 style.setSizeEndText(null); 110 assertEquals("", style.getSizeEndText()); 111 } 112 113 public void testSetSummaryObjectStartText() { 114 ToStringStyle style = new ToStringStyleImpl(); 115 style.setSummaryObjectStartText(null); 116 assertEquals("", style.getSummaryObjectStartText()); 117 } 118 119 public void testSetSummaryObjectEndText() { 120 ToStringStyle style = new ToStringStyleImpl(); 121 style.setSummaryObjectEndText(null); 122 assertEquals("", style.getSummaryObjectEndText()); 123 } 124 125 } 126 | Popular Tags |