001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.commons.lang.builder;
018:
019: import junit.framework.Test;
020: import junit.framework.TestCase;
021: import junit.framework.TestSuite;
022: import junit.textui.TestRunner;
023:
024: /**
025: * Test case for ToStringStyle.
026: *
027: * @author Masato Tezuka
028: * @version $Id: ToStringStyleTest.java 437554 2006-08-28 06:21:41Z bayard $
029: */
030: public class ToStringStyleTest extends TestCase {
031:
032: public ToStringStyleTest(String name) {
033: super (name);
034: }
035:
036: public static void main(String[] args) {
037: TestRunner.run(suite());
038: }
039:
040: public static Test suite() {
041: TestSuite suite = new TestSuite(ToStringStyleTest.class);
042: suite.setName("ToStringStyle Tests");
043: return suite;
044: }
045:
046: protected void setUp() throws Exception {
047: super .setUp();
048: }
049:
050: private static class ToStringStyleImpl extends ToStringStyle {
051: }
052:
053: //-----------------------------------------------------------------------
054: public void testSetArrayStart() {
055: ToStringStyle style = new ToStringStyleImpl();
056: style.setArrayStart(null);
057: assertEquals("", style.getArrayStart());
058: }
059:
060: public void testSetArrayEnd() {
061: ToStringStyle style = new ToStringStyleImpl();
062: style.setArrayEnd(null);
063: assertEquals("", style.getArrayEnd());
064: }
065:
066: public void testSetArraySeparator() {
067: ToStringStyle style = new ToStringStyleImpl();
068: style.setArraySeparator(null);
069: assertEquals("", style.getArraySeparator());
070: }
071:
072: public void testSetContentStart() {
073: ToStringStyle style = new ToStringStyleImpl();
074: style.setContentStart(null);
075: assertEquals("", style.getContentStart());
076: }
077:
078: public void testSetContentEnd() {
079: ToStringStyle style = new ToStringStyleImpl();
080: style.setContentEnd(null);
081: assertEquals("", style.getContentEnd());
082: }
083:
084: public void testSetFieldNameValueSeparator() {
085: ToStringStyle style = new ToStringStyleImpl();
086: style.setFieldNameValueSeparator(null);
087: assertEquals("", style.getFieldNameValueSeparator());
088: }
089:
090: public void testSetFieldSeparator() {
091: ToStringStyle style = new ToStringStyleImpl();
092: style.setFieldSeparator(null);
093: assertEquals("", style.getFieldSeparator());
094: }
095:
096: public void testSetNullText() {
097: ToStringStyle style = new ToStringStyleImpl();
098: style.setNullText(null);
099: assertEquals("", style.getNullText());
100: }
101:
102: public void testSetSizeStartText() {
103: ToStringStyle style = new ToStringStyleImpl();
104: style.setSizeStartText(null);
105: assertEquals("", style.getSizeStartText());
106: }
107:
108: public void testSetSizeEndText() {
109: ToStringStyle style = new ToStringStyleImpl();
110: style.setSizeEndText(null);
111: assertEquals("", style.getSizeEndText());
112: }
113:
114: public void testSetSummaryObjectStartText() {
115: ToStringStyle style = new ToStringStyleImpl();
116: style.setSummaryObjectStartText(null);
117: assertEquals("", style.getSummaryObjectStartText());
118: }
119:
120: public void testSetSummaryObjectEndText() {
121: ToStringStyle style = new ToStringStyleImpl();
122: style.setSummaryObjectEndText(null);
123: assertEquals("", style.getSummaryObjectEndText());
124: }
125:
126: }
|