@Test(expectedExceptions = NullPointerException.class) public void testNullIsBad() { HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma").build(); binder.bindToRequest(request, null); } }
@Test(expectedExceptions = NullPointerException.class) public void testNullIsBad() { HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma").build(); binder.bindToRequest(request, null); } }
public void testMapping() { String json = "{\"foo\":true}"; HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build(); request = binder.bindToRequest(request, json); assertEquals( request.getPayload().getRawContent(), "Storage.S3.UploadPolicy=eyJmb28iOnRydWV9&Storage.S3.UploadPolicySignature=UbDQLDM5P3aZ840aqJoH%2B6rwDcRo5KrIfsG7vJWHIVY%3D"); }
public void testMapping() { String json = "{\"foo\":true}"; HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build(); request = binder.bindToRequest(request, json); assertEquals( request.getPayload().getRawContent(), "Storage.S3.UploadPolicy=eyJmb28iOnRydWV9&Storage.S3.UploadPolicySignature=UbDQLDM5P3aZ840aqJoH%2B6rwDcRo5KrIfsG7vJWHIVY%3D"); }