use of com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithUrl in project Java-Mandrill-Wrapper by cribbstechnologies.
the class MandrillRESTRequestTest method testGetPostDataMandrillRequestWithUrl.
@Test
public void testGetPostDataMandrillRequestWithUrl() throws Exception {
this.initRequestWithActualMapper();
assertEquals("{\"key\":null,\"url\":null}", this.request.getPostData(this.emptyUrlRequest));
this.mutableUrlRequest = new MandrillRequestWithUrl();
this.mutableUrlRequest.setKey("TEST");
this.mutableUrlRequest.setUrl("http://www.google.com");
assertEquals("{\"key\":\"TEST\",\"url\":\"http://www.google.com\"}", this.request.getPostData(this.mutableUrlRequest));
}
use of com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithUrl in project Java-Mandrill-Wrapper by cribbstechnologies.
the class UrlsTest method testGetTimeSeries.
@Test
public void testGetTimeSeries() {
MandrillRequestWithUrl request = new MandrillRequestWithUrl();
request.setUrl("http://www.google.com");
try {
UrlListResponse response = urlsRequest.getTimeSeries(request);
} catch (RequestFailedException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
Aggregations