Package org.openengsb.core.api.context

Examples of org.openengsb.core.api.context.ContextCurrentService


    }

    @Test
    public void testInstallContextFile_shouldCreateContext() throws Exception {
        File contextFile = temporaryFolder.newFile("newContextId.context");
        ContextCurrentService contextCurrentService = mock(ContextCurrentService.class);
        contextDeployerService.setContextCurrentService(contextCurrentService);

        contextDeployerService.install(contextFile);

        verify(contextCurrentService).createContext("newContextId");
View Full Code Here


    }

    @Test
    public void testUpdatedContext_shouldNotBeCreatedAgain() throws Exception {
        File contextFile = temporaryFolder.newFile("newContextId.context");
        ContextCurrentService contextCurrentService = mock(ContextCurrentService.class);
        contextDeployerService.setContextCurrentService(contextCurrentService);

        contextDeployerService.install(contextFile);
        when(contextCurrentService.getAvailableContexts()).thenReturn(Arrays.asList("newContextId"));       
        contextDeployerService.update(contextFile);

        verify(contextCurrentService, times(1)).createContext("newContextId");
    }
View Full Code Here

        contextList.add("one");
        contextList.add("two");
        contextList.add("twotimes1");
        contextList.add("twotimes2");
        contextList.add("foo");
        ContextCurrentService contextService =
            (ContextCurrentService) context.getBean("contextCurrentService");
        when(contextService.getAvailableContexts()).thenReturn(contextList);
        createConnectors();
        tester.getApplication().getComponentInstantiationListeners()
            .add(new PaxWicketSpringBeanComponentInjector(tester.getApplication(), context));
        tester.startPage(WiringPage.class);
        formTester = tester.newFormTester("wiringForm");
View Full Code Here

    public void setUp() throws Exception {
        waitForOsgiBundle("org.openengsb.ui.common");
        String httpPort = getConfigProperty("org.ops4j.pax.web", "org.osgi.service.http.port");
        pageEntryUrl = "http://localhost:" + httpPort + "/openengsb/tasks/?context=" + CONTEXT;
        webClient = new WebClient();
        ContextCurrentService contextService = getOsgiService(ContextCurrentService.class);
        if (!contextService.getAvailableContexts().contains(CONTEXT)) {
            contextService.createContext(CONTEXT);
        }
        ContextHolder.get().setCurrentContextId(CONTEXT);
        ruleManager = getOsgiService(RuleManager.class);
        workflowService = getOsgiService(WorkflowService.class);
        taskboxService = getOsgiService(WebTaskboxService.class);
View Full Code Here

    @Test
    @Ignore
    public void testSendEvent_shouldCallService() throws Exception {
        authenticateAsAdmin();
        addHelloWorldRule();
        ContextCurrentService contextService = getOsgiService(ContextCurrentService.class);
        contextService.createContext("42");
        ContextHolder.get().setCurrentContextId("42");

        Dictionary<String, Object> properties = new Hashtable<String, Object>();
        String[] clazzes = new String[]{ Domain.class.getName(), ExampleDomain.class.getName() };
        properties.put("id", "dummyLog");
View Full Code Here

    private WorkflowService workflowService;
    private RuleManager ruleManager;

    @Before
    public void setUp() throws Exception {
        ContextCurrentService contextService = getOsgiService(ContextCurrentService.class);
        if (!contextService.getAvailableContexts().contains("it-taskbox")) {
            contextService.createContext("it-taskbox");
        }
        ContextHolder.get().setCurrentContextId("it-taskbox");
        ruleManager = getOsgiService(RuleManager.class);
        workflowService = getOsgiService(WorkflowService.class);
        taskboxService = getOsgiService(TaskboxService.class);
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.context.ContextCurrentService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.