Skip to content

Commit

Permalink
Fixed cloneObject Test
Browse files Browse the repository at this point in the history
  • Loading branch information
aminfa committed Dec 29, 2017
1 parent 6bd0fa6 commit a7fbfd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/de/upb/pasestub/PaseInstanceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void testNoCreateCall() throws IOException{
instance.callFunction("func", new HashMap<String, Object>());
}

@Test
public void cloneTest() throws Exception{

stubFor(post(urlEqualTo("/construct"))
Expand All @@ -109,11 +110,11 @@ public void cloneTest() throws Exception{
.withHeader("Content-Type", "application/json")
.withBody("{\"id\": \"7B495ECC9C\", \"class\": \"class_name\"}")));

stubFor(get(urlEqualTo("/construct/class_name/copy/7B495ECC9C"))
stubFor(get(urlEqualTo("/class_name/copy/7B495ECC9C"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody("{\"id\": \"7B495ECC99\", \"class\": \"plainlib.package1.b.B\"}")));
.withBody("{\"id\": \"7B495ECC99\", \"class\": \"class_name\"}")));

PaseInstance instance = new PaseInstance(host);
instance.create("construct", new HashMap<>());
Expand Down

0 comments on commit a7fbfd6

Please sign in to comment.