Search in sources :

Example 1 with UsersSendersResponse

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

the class MandrillUsersRequestTest method testGetSenders.

@Test
public void testGetSenders() throws RequestFailedException {
    usersRequest.setRequest(request);
    UsersSendersResponse response = new UsersSendersResponse();
    Mockito.when(request.postRequest(bmr, ServiceMethods.Users.SENDERS, UsersSendersResponse.class, usersRequest.getUsersListReference())).thenReturn(response);
    usersRequest.getSenders(bmr);
    Mockito.verify(request).postRequest(bmr, ServiceMethods.Users.SENDERS, UsersSendersResponse.class, usersRequest.getUsersListReference());
}
Also used : UsersSendersResponse(com.cribbstechnologies.clients.mandrill.model.response.users.UsersSendersResponse) Test(org.junit.Test)

Example 2 with UsersSendersResponse

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

the class MandrillUsersRequest method getSenders.

/**
     * Return the senders that have tried to use this account, both verified and unverified
     * 
     * @param sendersRequest
     *            a populated @see com.cribbstechnologies.clients.mandrill.model.BaseMandrillRequest
     * @throws RequestFailedException
     */
public UsersSendersResponse getSenders(BaseMandrillRequest sendersRequest) throws RequestFailedException {
    UsersSendersResponse response = new UsersSendersResponse();
    response.setList(((BaseMandrillAnonymousListResponse<MandrillSender>) request.postRequest(sendersRequest, ServiceMethods.Users.SENDERS, UsersSendersResponse.class, usersListReference)).getList());
    return response;
}
Also used : UsersSendersResponse(com.cribbstechnologies.clients.mandrill.model.response.users.UsersSendersResponse) MandrillSender(com.cribbstechnologies.clients.mandrill.model.response.users.MandrillSender)

Aggregations

UsersSendersResponse (com.cribbstechnologies.clients.mandrill.model.response.users.UsersSendersResponse)2 MandrillSender (com.cribbstechnologies.clients.mandrill.model.response.users.MandrillSender)1 Test (org.junit.Test)1