Search in sources :

Example 1 with VerifyResponse

use of com.cribbstechnologies.clients.mandrill.model.response.users.VerifyResponse in project Java-Mandrill-Wrapper by cribbstechnologies.

the class MandrillUsersRequestTest method testVerifySender.

@Test
public void testVerifySender() throws RequestFailedException {
    usersRequest.setRequest(request);
    MandrillRequestWithEmail verifyRequest = new MandrillRequestWithEmail();
    VerifyResponse response = new VerifyResponse();
    Mockito.when(request.postRequest(verifyRequest, ServiceMethods.Users.VERIFY_SENDER, VerifyResponse.class)).thenReturn(response);
    usersRequest.verifySender(verifyRequest);
    Mockito.verify(request).postRequest(verifyRequest, ServiceMethods.Users.VERIFY_SENDER, VerifyResponse.class);
}
Also used : VerifyResponse(com.cribbstechnologies.clients.mandrill.model.response.users.VerifyResponse) MandrillRequestWithEmail(com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithEmail) Test(org.junit.Test)

Example 2 with VerifyResponse

use of com.cribbstechnologies.clients.mandrill.model.response.users.VerifyResponse in project Java-Mandrill-Wrapper by cribbstechnologies.

the class UsersTest method testVerifySender.

@Test
public void testVerifySender() {
    MandrillRequestWithEmail emailRequest = new MandrillRequestWithEmail();
    emailRequest.setEmail(props.getProperty("verify.email"));
    try {
        VerifyResponse response = usersRequest.verifySender(emailRequest);
    } catch (RequestFailedException e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
}
Also used : VerifyResponse(com.cribbstechnologies.clients.mandrill.model.response.users.VerifyResponse) RequestFailedException(com.cribbstechnologies.clients.mandrill.exception.RequestFailedException) MandrillRequestWithEmail(com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithEmail) Test(org.junit.Test)

Aggregations

MandrillRequestWithEmail (com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithEmail)2 VerifyResponse (com.cribbstechnologies.clients.mandrill.model.response.users.VerifyResponse)2 Test (org.junit.Test)2 RequestFailedException (com.cribbstechnologies.clients.mandrill.exception.RequestFailedException)1