| 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 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 6 |
Complexity Density: 0.6 |
|
| 11 |
|
public class BaseErrorTest extends TestCase { |
| 12 |
|
|
| 13 |
|
private BaseError error; |
| 14 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 15 |
4
|
@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 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 30 |
4
|
@Override... |
| 31 |
|
protected void tearDown() throws Exception { |
| 32 |
4
|
super.tearDown(); |
| 33 |
|
} |
| 34 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1
PASS
|
|
| 35 |
1
|
public void testGetCode() {... |
| 36 |
1
|
assertEquals(-1, error.getCode()); |
| 37 |
|
} |
| 38 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1
PASS
|
|
| 39 |
1
|
public void testGetCommand() {... |
| 40 |
1
|
assertNotNull(error.getCommand()); |
| 41 |
|
} |
| 42 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1
PASS
|
|
| 43 |
1
|
public void testGetDescription() {... |
| 44 |
1
|
assertEquals("testing", error.getDescription()); |
| 45 |
|
} |
| 46 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1
PASS
|
|
| 47 |
1
|
public void testGetService() {... |
| 48 |
1
|
assertNotNull(error.getService()); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
} |