Search in sources :

Example 1 with BeanTestBean

use of com.canoo.dolphin.integration.bean.BeanTestBean in project dolphin-platform by canoo.

the class BeansControllerTest method testCreateController.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Test if all bean types of Dolphin Platform can be injected in a controller")
public void testCreateController(String containerType, String endpoint) {
    try {
        ClientContext context = connect(endpoint);
        ControllerProxy<BeanTestBean> controller = createController(context, BEAN_CONTROLLER_NAME);
        Assert.assertTrue(controller.getModel().getBeanManagerInjected());
        Assert.assertTrue(controller.getModel().getClientSessionInjected());
        Assert.assertTrue(controller.getModel().getDolphinEventBusInjected());
        Assert.assertTrue(controller.getModel().getPropertyBinderInjected());
        Assert.assertTrue(controller.getModel().getRemotingContextInjected());
        destroy(controller, endpoint);
        disconnect(context, endpoint);
    } catch (Exception e) {
        Assert.fail("Error in test for " + containerType, e);
    }
}
Also used : ClientContext(com.canoo.platform.remoting.client.ClientContext) BeanTestBean(com.canoo.dolphin.integration.bean.BeanTestBean) Test(org.testng.annotations.Test)

Aggregations

BeanTestBean (com.canoo.dolphin.integration.bean.BeanTestBean)1 ClientContext (com.canoo.platform.remoting.client.ClientContext)1 Test (org.testng.annotations.Test)1