TestMIDLet Coverage Report

Metrics: CCN: 1,2 Methods: 5
NCSS: 3,4 Classes: -
JVDC: 0% Packages: -
Need help?
Package # Classes Line Coverage Branch Coverage Method Coverage
(default package) 2
0% 
0% 
0% 

Class Line Coverage Branch Coverage Method Coverage
TestMIDlet.1
0% 
0% 
0% 

 1  
 import javax.microedition.lcdui.Command;
 2  
 import javax.microedition.lcdui.CommandListener;
 3  
 import javax.microedition.lcdui.Display;
 4  
 import javax.microedition.lcdui.Displayable;
 5  
 import javax.microedition.lcdui.TextBox;
 6  
 import javax.microedition.midlet.MIDlet;
 7  
 import javax.microedition.midlet.MIDletStateChangeException;
 8  
 
 9  
 
 10  
 public class TestMIDlet extends MIDlet {
 11  
         
 12  
         private Command exitCommand;
 13  
         private Command infoCommand;
 14  
         
 15  
         TestMIDlet() {
 16  
                 exitCommand = new Command("Exit", Command.SCREEN, 1);
 17  
                 infoCommand = new Command("Info", Command.SCREEN, 2);                
 18  
         }
 19  
 
 20  
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
 21  
         }
 22  
 
 23  
         protected void pauseApp() {        }
 24  
 
 25  
         protected void startApp() throws MIDletStateChangeException {
 26  
                 TextBox t = new TextBox("FirstMIDlet", "Welcome to my Test", 256, 0);
 27  
                 t.addCommand(exitCommand);
 28  
                 t.addCommand(infoCommand);
 29  0
                 t.setCommandListener(new CommandListener() {
 30  
                         
 31  
                         public void commandAction(Command arg0, Displayable arg1) {
 32  0
                                 if (arg0 == exitCommand) {
 33  0
                                         notifyDestroyed();
 34  
                                 }
 35  0
                         }
 36  
                 });
 37  
                 Display.getDisplay(this).setCurrent(t);
 38  
         }
 39  
 }

Legend:
Instrumented line CCN: Cyclomatic Complexity
Covered line NCSS: Non-Commenting Source Statement
Uncovered line JVDC: JaVaDoc Comment