1 23 package com.sun.enterprise.cli.commands; 24 25 31 import com.sun.enterprise.cli.framework.*; 32 import junit.framework.*; 38 import junit.textui.TestRunner; 39 import java.util.Vector ; 40 import java.io.File ; 41 import java.io.PrintWriter ; 42 import java.io.OutputStreamWriter ; 43 import java.io.FileOutputStream ; 44 import javax.management.MBeanServerConnection ; 45 46 47 48 53 54 59 60 public class NYICommandTest extends TestCase { 61 62 public void testrunCommand() throws Exception { 63 try{ 64 testCommand.runCommand(); 65 }catch (CommandException ce){ 66 assertEquals(ce.getMessage(), "Command Not Yet Implemented"); 67 } 68 } 69 70 public NYICommandTest(String name){ 71 super(name); 72 } 73 74 NYICommand testCommand = null; 75 76 protected void setUp() throws Exception { 77 testCommand = new NYICommand(); 82 testCommand.setName("sampleCommand"); 83 } 84 85 86 87 protected void tearDown() { 88 } 89 90 private void nyi(){ 91 fail("Not Yet Implemented"); 92 } 93 94 public static Test suite(){ 95 TestSuite suite = new TestSuite(NYICommandTest.class); 96 return suite; 97 } 98 99 public static void main(String args[]) throws Exception { 100 final TestRunner runner= new TestRunner(); 101 final TestResult result = runner.doRun(NYICommandTest.suite(), false); 102 System.exit(result.errorCount() + result.failureCount()); 103 } 104 } 105 106 | Popular Tags |