1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17+
1718package org .apache .commons .cli ;
1819
1920import java .io .ByteArrayOutputStream ;
2021import java .io .PrintWriter ;
21-
2222import java .util .Comparator ;
2323
2424import junit .framework .TestCase ;
25- import junit .framework .TestSuite ;
2625
2726/**
2827 * Test case for the HelpFormatter class
3332 **/
3433public class HelpFormatterTest extends TestCase
3534{
36-
3735 private static final String EOL = System .getProperty ("line.separator" );
3836
3937 public static void main ( String [] args )
@@ -42,18 +40,7 @@ public static void main( String[] args )
4240 junit .textui .TestRunner .main (testName );
4341 }
4442
45- public static TestSuite suite ()
46- {
47- return new TestSuite (HelpFormatterTest .class );
48- }
49-
50- public HelpFormatterTest ( String s )
51- {
52- super ( s );
53- }
54-
55- public void testFindWrapPos ()
56- throws Exception
43+ public void testFindWrapPos () throws Exception
5744 {
5845 HelpFormatter hf = new HelpFormatter ();
5946
@@ -67,8 +54,7 @@ public void testFindWrapPos()
6754 assertEquals ("wrap position 3" , 4 , hf .findWrapPos (text , 3 , 0 ));
6855 }
6956
70- public void testPrintWrapped ()
71- throws Exception
57+ public void testPrintWrapped () throws Exception
7258 {
7359 StringBuffer sb = new StringBuffer ();
7460 HelpFormatter hf = new HelpFormatter ();
@@ -116,8 +102,7 @@ public void testPrintWrapped()
116102 assertEquals ("multi-line padded text" , expected , sb .toString ());
117103 }
118104
119- public void testPrintOptions ()
120- throws Exception
105+ public void testPrintOptions () throws Exception
121106 {
122107 StringBuffer sb = new StringBuffer ();
123108 HelpFormatter hf = new HelpFormatter ();
@@ -169,8 +154,7 @@ public void testPrintOptions()
169154 assertEquals ("multiple wrapped options" , expected , sb .toString ());
170155 }
171156
172- public void testAutomaticUsage ()
173- throws Exception
157+ public void testAutomaticUsage () throws Exception
174158 {
175159 HelpFormatter hf = new HelpFormatter ();
176160 Options options = null ;
0 commit comments