EMMA Coverage Report (generated Thu Sep 14 09:32:01 MDT 2006)
[all classes][biz.xsoftware.mock.client.example1]

COVERAGE SUMMARY FOR SOURCE FILE [TestExample.java]

nameclass, %method, %block, %line, %
TestExample.java100% (1/1)67%  (2/3)13%  (5/38)20%  (2/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TestExample100% (1/1)67%  (2/3)13%  (5/38)20%  (2/10)
testClickingButton (): void 0%   (0/1)0%   (0/33)0%   (0/8)
TestExample (): void 100% (1/1)100% (3/3)100% (1/1)
getModuleName (): String 100% (1/1)100% (2/2)100% (1/1)

1/**
2 *  Copyright (C) 2006 Carrier Access, Corp.
3 */
4package biz.xsoftware.mock.client.example1;
5 
6import biz.xsoftware.mock.client.JsCalledMethod;
7 
8import com.google.gwt.junit.client.GWTTestCase;
9import com.google.gwt.user.client.ui.ClickListener;
10import com.google.gwt.user.client.ui.Widget;
11 
12/**
13 */
14public class TestExample extends GWTTestCase
15{
16 
17    /**
18     * @see com.google.gwt.junit.client.GWTTestCase#getModuleName()
19     */
20    public String getModuleName()
21    {
22        return "biz.xsoftware.mock.MockLib";
23    }
24 
25    public void testClickingButton() {
26        MockListenerManager mock = new MockListenerManager();
27        
28        MyApplication app = new MyApplication(mock);
29        
30        JsCalledMethod method = mock.expect("addClickListener");
31        Widget widget = (Widget)method.getAllParams()[0];
32        ClickListener l = (ClickListener)method.getAllParams()[1];
33        
34        //click the button.....
35        l.onClick(widget);
36        
37        assertEquals(true, app.getWasClicked());
38    }
39}

[all classes][biz.xsoftware.mock.client.example1]
EMMA 2.0.4217 (C) Vladimir Roubtsov