Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Upgrade to Platform 1.07
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Nov 12, 2014
1 parent 4cc4af7 commit ff5aaf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.proofpoint.platform</groupId>
<artifactId>rest-server-base</artifactId>
<version>1.05</version>
<version>1.07</version>
</parent>

<licenses>
Expand Down
27 changes: 6 additions & 21 deletions src/test/java/com/proofpoint/event/collector/TestServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import static com.proofpoint.http.client.Request.Builder.prepareDelete;
import static com.proofpoint.http.client.Request.Builder.prepareGet;
import static com.proofpoint.http.client.Request.Builder.preparePost;
import static com.proofpoint.http.client.SmileBodyGenerator.smileBodyGenerator;
import static com.proofpoint.http.client.StaticBodyGenerator.createStaticBodyGenerator;
import static com.proofpoint.http.client.StatusResponseHandler.createStatusResponseHandler;
import static com.proofpoint.http.client.StringResponseHandler.createStringResponseHandler;
Expand Down Expand Up @@ -169,18 +170,10 @@ public void testPostSmile()
throws IOException, ExecutionException, InterruptedException
{
StatusResponse response = client.execute(preparePost()
.setUri(urlFor("/v2/event"))
.setHeader("Content-Type", "application/x-jackson-smile")
.setBodyGenerator(new BodyGenerator()
{
@Override
public void write(OutputStream outputStream)
throws Exception
{
MAPPER.writeValue(outputStream, TESTING_SINGLE_EVENT_STRUCTURE);
}
})
.build(),
.setUri(urlFor("/v2/event"))
.setHeader("Content-Type", "application/x-jackson-smile")
.setBodyGenerator(smileBodyGenerator(OBJECT_CODEC, TESTING_SINGLE_EVENT_STRUCTURE))
.build(),
createStatusResponseHandler());

assertEquals(response.getStatusCode(), Status.ACCEPTED.getStatusCode());
Expand Down Expand Up @@ -248,15 +241,7 @@ public void testDistributeSmile()
StatusResponse response = client.execute(preparePost()
.setUri(urlFor("/v2/event/distribute"))
.setHeader("Content-Type", "application/x-jackson-smile")
.setBodyGenerator(new BodyGenerator()
{
@Override
public void write(OutputStream outputStream)
throws Exception
{
MAPPER.writeValue(outputStream, TESTING_SINGLE_EVENT_STRUCTURE);
}
})
.setBodyGenerator(smileBodyGenerator(OBJECT_CODEC, TESTING_SINGLE_EVENT_STRUCTURE))
.build(),
createStatusResponseHandler());

Expand Down

0 comments on commit ff5aaf7

Please sign in to comment.