Clover Coverage Report - ARESTC 0.1.7-SNAPSHOT
Coverage timestamp: Fri Aug 27 2010 19:12:04 CEST
10   51   6   1.67
0   40   0.6   6
6     1  
1    
 
  BaseErrorTest       Line # 11 10 0% 6 0 100% 1.0
 
  (4)
 
1    package net.sf.arestc.core;
2   
3    import junit.framework.TestCase;
4    import net.sf.arestc.core.services.BaseService;
5    import net.sf.arestc.core.services.HTTPMethods;
6    import net.sf.arestc.core.services.ReturnedTypes;
7    import net.sf.arestc.core.services.ServiceAuthenticationData;
8    import net.sf.arestc.core.services.ServiceConnectionData;
9    import net.sf.arestc.core.services.ServiceConnectorData;
10   
 
11    public class BaseErrorTest extends TestCase {
12   
13    private BaseError error;
14   
 
15  4 toggle @Override
16    protected void setUp() throws Exception {
17  4 super.setUp();
18  4 final ServiceConnectionData connectionData = new ServiceConnectionData(
19    "localhost", 8080, "/", HTTPMethods.GET);
20  4 final ServiceAuthenticationData authData = new ServiceAuthenticationData(
21    false, null, null);
22  4 final ServiceConnectorData connectorData = new ServiceConnectorData(
23    null, ReturnedTypes.NOBODY);
24  4 error = new BaseError(-1, new BaseCommand(), "testing",
25    new BaseService("testService", null, connectionData, authData,
26    connectorData));
27   
28    }
29   
 
30  4 toggle @Override
31    protected void tearDown() throws Exception {
32  4 super.tearDown();
33    }
34   
 
35  1 toggle public void testGetCode() {
36  1 assertEquals(-1, error.getCode());
37    }
38   
 
39  1 toggle public void testGetCommand() {
40  1 assertNotNull(error.getCommand());
41    }
42   
 
43  1 toggle public void testGetDescription() {
44  1 assertEquals("testing", error.getDescription());
45    }
46   
 
47  1 toggle public void testGetService() {
48  1 assertNotNull(error.getService());
49    }
50   
51    }