KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > lang > builder > ToStringStyleTest


1 /*
2  * Copyright 2004-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

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 /**
24  * Test case for ToStringStyle.
25  *
26  * @author Masato Tezuka
27  * @version $Id: ToStringStyleTest.java 161244 2005-04-14 06:16:36Z ggregory $
28  */

29 public class ToStringStyleTest extends TestCase {
30
31     public ToStringStyleTest(String JavaDoc name) {
32         super(name);
33     }
34
35     public static void main(String JavaDoc[] 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 JavaDoc {
46         super.setUp();
47     }
48
49     private static class ToStringStyleImpl extends ToStringStyle {
50     }
51
52     //-----------------------------------------------------------------------
53
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