1 23 24 package com.sun.enterprise.cli.framework; 25 26 import junit.framework.*; 27 32 33 public class NullOutputTest extends TestCase { 34 public void testIt() { 35 final NullOutput no = new NullOutput(); 36 final String m = "a message"; 37 final Object o = (Object ) "an object"; 38 no.print(m); 39 no.print(o); 40 no.println(m); 41 no.println(o); 42 no.close(); 43 no.flush(); 44 no.close(); 45 no.println(m); 46 } 47 48 public NullOutputTest(String name){ 49 super(name); 50 } 51 52 protected void setUp() { 53 } 54 55 protected void tearDown() { 56 } 57 58 private void nyi(){ 59 fail("Not Yet Implemented"); 60 } 61 62 public static void main(String args[]){ 63 if (args.length == 0){ 64 junit.textui.TestRunner.run(NullOutputTest.class); 65 } else { 66 junit.textui.TestRunner.run(makeSuite(args)); 67 } 68 } 69 private static TestSuite makeSuite(String args[]){ 70 final TestSuite ts = new TestSuite(); 71 for (int i = 0; i < args.length; i++){ 72 ts.addTest(new NullOutputTest(args[i])); 73 } 74 return ts; 75 } 76 } 77 | Popular Tags |