Search in sources :

Example 6 with BulkSmsGatewayConfig

use of org.hisp.dhis.sms.config.BulkSmsGatewayConfig in project dhis2-core by dhis2.

the class BulkSmsGatewayTest method initTest.

@BeforeEach
public void initTest() {
    smsGatewayConfig = new BulkSmsGatewayConfig();
    smsGatewayConfig.setDefault(true);
    smsGatewayConfig.setUsername("username");
    smsGatewayConfig.setPassword("password");
    recipients.add(PHONE_NUMBER);
    outboundMessageList.add(new OutboundMessage(SUBJECT, MESSAGE, recipients));
    outboundMessageList.add(new OutboundMessage(SUBJECT, MESSAGE, recipients));
    outboundMessageList.add(new OutboundMessage(SUBJECT, MESSAGE, recipients));
    batch = new OutboundMessageBatch(outboundMessageList, DeliveryChannel.SMS);
    when(pbeStringEncryptor.decrypt(anyString())).thenReturn(smsGatewayConfig.getPassword());
}
Also used : OutboundMessageBatch(org.hisp.dhis.outboundmessage.OutboundMessageBatch) OutboundMessage(org.hisp.dhis.outboundmessage.OutboundMessage) BulkSmsGatewayConfig(org.hisp.dhis.sms.config.BulkSmsGatewayConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BulkSmsGatewayConfig (org.hisp.dhis.sms.config.BulkSmsGatewayConfig)6 SmsConfiguration (org.hisp.dhis.sms.config.SmsConfiguration)4 OutboundMessage (org.hisp.dhis.outboundmessage.OutboundMessage)2 ClickatellGatewayConfig (org.hisp.dhis.sms.config.ClickatellGatewayConfig)2 SmsGatewayConfig (org.hisp.dhis.sms.config.SmsGatewayConfig)2 Date (java.util.Date)1 HashSet (java.util.HashSet)1 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)1 OutboundMessageBatch (org.hisp.dhis.outboundmessage.OutboundMessageBatch)1 OutboundMessageResponse (org.hisp.dhis.outboundmessage.OutboundMessageResponse)1 ProgramMessageQueryParams (org.hisp.dhis.program.message.ProgramMessageQueryParams)1 ProgramMessageRecipients (org.hisp.dhis.program.message.ProgramMessageRecipients)1 GenericHttpGatewayConfig (org.hisp.dhis.sms.config.GenericHttpGatewayConfig)1 User (org.hisp.dhis.user.User)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1