Search in sources :

Example 1 with NewAPIVersionEmailNotifierWrapper

use of org.wso2.carbon.apimgt.impl.notification.util.NewAPIVersionEmailNotifierWrapper in project carbon-apimgt by wso2.

the class NewAPIVersionEmailNotifierTest method testShouldNotThrowExceptionWhenRetrievingNotifiers.

@Test
public void testShouldNotThrowExceptionWhenRetrievingNotifiers() throws APIManagementException {
    NewAPIVersionEmailNotifier emailNotifier = new NewAPIVersionEmailNotifierWrapper(registry, claimsRetriever);
    ClaimsRetriever claimsRetriever = Mockito.mock(ClaimsRetriever.class);
    Mockito.doNothing().when(claimsRetriever).init();
    try {
        emailNotifier.getNotifierSet(notificationDTO);
    } catch (NotificationException e) {
        Assert.fail("Should not throw any exceptions");
    }
}
Also used : NewAPIVersionEmailNotifierWrapper(org.wso2.carbon.apimgt.impl.notification.util.NewAPIVersionEmailNotifierWrapper) NotificationException(org.wso2.carbon.apimgt.impl.notification.exception.NotificationException) ClaimsRetriever(org.wso2.carbon.apimgt.impl.token.ClaimsRetriever) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NotificationException (org.wso2.carbon.apimgt.impl.notification.exception.NotificationException)1 NewAPIVersionEmailNotifierWrapper (org.wso2.carbon.apimgt.impl.notification.util.NewAPIVersionEmailNotifierWrapper)1 ClaimsRetriever (org.wso2.carbon.apimgt.impl.token.ClaimsRetriever)1