Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotAutoActivateIfConfigured()
        public virtual void shouldNotAutoActivateIfConfigured()
        {
            // given
            JobExecutorXmlImpl   jobExecutorXml   = defineJobExecutor();
            ProcessEngineXmlImpl processEngineXml = defineProcessEngine();

            // activate set to false
            processEngineXml.Properties["jobExecutorActivate"] = "false";
            BpmPlatformXmlImpl bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.singletonList <ProcessEngineXml>(processEngineXml));

            // when
            deployPlatform(bpmPlatformXml);

            try
            {
                ProcessEngine processEngine = getProcessEngine(ENGINE_NAME);
                ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl)processEngine.ProcessEngineConfiguration;
                // then
                assertEquals(false, processEngineConfiguration.JobExecutor.Active);
            }
            finally
            {
                undeployPlatform();
            }
        }
Esempio n. 2
0
        private ProcessEngineXmlImpl defineProcessEngine()
        {
            ProcessEngineXmlImpl        processEngineXml = new ProcessEngineXmlImpl();
            Dictionary <string, string> properties       = new Dictionary <string, string>();

            properties["jdbcUrl"]               = "jdbc:h2:mem:PlatformJobExecutorActivateTest-db";
            processEngineXml.Properties         = properties;
            processEngineXml.Plugins            = new List <ProcessEnginePluginXml>();
            processEngineXml.Name               = ENGINE_NAME;
            processEngineXml.JobAcquisitionName = ACQUISITION_NAME;
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            processEngineXml.ConfigurationClass = typeof(StandaloneInMemProcessEngineConfiguration).FullName;
            processEngineXml.Default            = true;
            return(processEngineXml);
        }