Search in sources :

Example 1 with SimplisticHttpGetGateWay

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

the class GenericSmsGatewayTest method setUp.

@BeforeEach
public void setUp() {
    subject = new SimplisticHttpGetGateWay(restTemplate, pbeStringEncryptor);
    gatewayConfig = new GenericHttpGatewayConfig();
    gatewayConfig.setUseGet(false);
    gatewayConfig.setName("generic");
    gatewayConfig.setUrlTemplate(GATEWAY_URL);
    gatewayConfig.setDefault(true);
    gatewayConfig.setUid(UID);
    username = new GenericGatewayParameter();
    username.setKey("user");
    username.setValue("user_uio");
    username.setEncode(false);
    username.setHeader(true);
    username.setConfidential(false);
    password = new GenericGatewayParameter();
    password.setKey("password");
    password.setValue("abc123");
    password.setEncode(false);
    password.setHeader(true);
    password.setConfidential(true);
    valueStore.put(SmsGateway.KEY_TEXT, SmsUtils.encode(TEXT));
    valueStore.put(SmsGateway.KEY_RECIPIENT, StringUtils.join(RECIPIENTS, ","));
}
Also used : GenericGatewayParameter(org.hisp.dhis.sms.config.GenericGatewayParameter) SimplisticHttpGetGateWay(org.hisp.dhis.sms.config.SimplisticHttpGetGateWay) GenericHttpGatewayConfig(org.hisp.dhis.sms.config.GenericHttpGatewayConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

GenericGatewayParameter (org.hisp.dhis.sms.config.GenericGatewayParameter)1 GenericHttpGatewayConfig (org.hisp.dhis.sms.config.GenericHttpGatewayConfig)1 SimplisticHttpGetGateWay (org.hisp.dhis.sms.config.SimplisticHttpGetGateWay)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1