use of com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithQuery in project Java-Mandrill-Wrapper by cribbstechnologies.
the class UrlsTest method testQuery.
@Test
public void testQuery() {
MandrillRequestWithQuery request = new MandrillRequestWithQuery();
request.setQ("http://www.google.com");
try {
UrlListResponse response = urlsRequest.doSearch(request);
} catch (RequestFailedException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
use of com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithQuery in project Java-Mandrill-Wrapper by cribbstechnologies.
the class MandrillRESTRequestTest method testGetPostDataMandrillRequestWithQuery.
@Test
public void testGetPostDataMandrillRequestWithQuery() throws Exception {
this.initRequestWithActualMapper();
assertEquals("{\"key\":null,\"q\":null}", this.request.getPostData(this.emptyQueryRequest));
this.mutableQueryRequest = new MandrillRequestWithQuery();
this.mutableQueryRequest.setKey("7890");
this.mutableQueryRequest.setQ("query string");
assertEquals("{\"key\":\"7890\",\"q\":\"query string\"}", this.request.getPostData(this.mutableQueryRequest));
}
Aggregations