| 1 |
|
package org.wso2.sample.msf4j.test; |
| 2 |
|
|
| 3 |
|
import junit.framework.TestCase; |
| 4 |
|
import net.sourceforge.jwebunit.junit.WebTester; |
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (24) |
Complexity: 4 |
Complexity Density: 0.2 |
|
| 8 |
|
public class RemoteTest extends TestCase { |
| 9 |
|
|
| 10 |
|
|
| 11 |
|
private WebTester tester; |
| 12 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 13 |
3 |
public RemoteTest(String name) {... |
| 14 |
3 |
super(name); |
| 15 |
3 |
tester = new WebTester(); |
| 16 |
|
} |
| 17 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1PASS
|
|
| 18 |
1 |
public void testGetPets() {... |
| 19 |
1 |
final String url = "http://localhost:9090/info"; |
| 20 |
1 |
System.out.println("TESTING REMOTE URL = " + url); |
| 21 |
1 |
tester.getTestContext().setBaseUrl(url); |
| 22 |
1 |
tester.beginAt("/pets"); |
| 23 |
1 |
tester.assertMatch("pets:"); |
| 24 |
|
} |
| 25 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1PASS
|
|
| 26 |
1 |
public void testGetPet() {... |
| 27 |
1 |
final String url = "http://localhost:9090/info"; |
| 28 |
1 |
System.out.println("TESTING REMOTE URL = " + url); |
| 29 |
1 |
tester.getTestContext().setBaseUrl(url); |
| 30 |
1 |
tester.beginAt("/pets/dog"); |
| 31 |
1 |
tester.assertMatch("pet:"); |
| 32 |
|
} |
| 33 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1PASS
|
|
| 34 |
1 |
public void testGetPetAndStatus() {... |
| 35 |
1 |
final String url = "http://localhost:9090/info"; |
| 36 |
1 |
System.out.println("TESTING REMOTE URL = " + url); |
| 37 |
1 |
tester.getTestContext().setBaseUrl(url); |
| 38 |
1 |
tester.beginAt("/pets/dog"); |
| 39 |
1 |
tester.assertMatch("pet:"); |
| 40 |
|
|
| 41 |
1 |
tester.getTestContext().setBaseUrl(url); |
| 42 |
1 |
tester.beginAt("/pets/dog/status"); |
| 43 |
1 |
tester.assertMatch("is sold"); |
| 44 |
|
} |
| 45 |
|
} |