Search in sources :

Example 11 with InitConfig

use of org.wso2.carbon.identity.core.handler.InitConfig in project carbon-identity-framework by wso2.

the class HttpIdentityResponseFactoryTest method testInitWithDuplicateEventListenerProperties.

@Test(dataProvider = "initConfigDataProvider")
public void testInitWithDuplicateEventListenerProperties(Properties eventListenerProperties, Properties expectedListenerProperties) throws Exception {
    Util.mockReturnEventListenerConfigWithProperties(eventListenerProperties);
    httpIdentityResponseFactory.init(new InitConfig());
    Util.assertPropertiesEqual(httpIdentityResponseFactory.properties, expectedListenerProperties);
}
Also used : InitConfig(org.wso2.carbon.identity.core.handler.InitConfig) Test(org.testng.annotations.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 12 with InitConfig

use of org.wso2.carbon.identity.core.handler.InitConfig in project carbon-identity-framework by wso2.

the class AbstractEventHandlerTest method testInit.

@Test
public void testInit() {
    InitConfig configuration = new ModuleConfiguration();
    TestEventHandler testEventHandler = new TestEventHandler();
    testEventHandler.init(configuration);
    Assert.assertEquals(testEventHandler.configs, configuration);
}
Also used : ModuleConfiguration(org.wso2.carbon.identity.event.bean.ModuleConfiguration) InitConfig(org.wso2.carbon.identity.core.handler.InitConfig) Test(org.testng.annotations.Test) IdentityBaseTest(org.wso2.carbon.identity.testutil.IdentityBaseTest)

Aggregations

Test (org.testng.annotations.Test)6 InitConfig (org.wso2.carbon.identity.core.handler.InitConfig)6 Map (java.util.Map)5 IdentityEventListenerConfig (org.wso2.carbon.identity.core.model.IdentityEventListenerConfig)5 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 HashMap (java.util.HashMap)2 IdentityBaseTest (org.wso2.carbon.identity.testutil.IdentityBaseTest)2 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Properties (java.util.Properties)1 ModuleConfiguration (org.wso2.carbon.identity.event.bean.ModuleConfiguration)1 EMMQSGConfig (org.wso2.mdm.qsg.dto.EMMQSGConfig)1