//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void performOperationStepWithDefaultProperties() public virtual void performOperationStepWithDefaultProperties() { IDictionary <string, string> properties = new Dictionary <string, string>(); jobExecutorXml.Properties = properties; step.performOperationStep(deploymentOperation); PlatformService <JmxManagedThreadPool> service = container.getService(ObjectNameForExecutor); ThreadPoolExecutor executor = service.Value.ThreadPoolExecutor; //since no jobs will start, remaining capacity is sufficent to check the size assertThat(executor.Queue.remainingCapacity(), @is(3)); assertThat(executor.CorePoolSize, @is(3)); assertThat(executor.MaximumPoolSize, @is(10)); assertThat(executor.getKeepAliveTime(TimeUnit.MILLISECONDS), @is(0L)); }
public virtual void undeployProcessApplication(AbstractProcessApplication processApplication) { ensureNotNull("Process application", processApplication); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String processAppName = processApplication.getName(); string processAppName = processApplication.Name; // if the process application is not deployed, ignore the request. if (serviceContainer.getService(ServiceTypes.PROCESS_APPLICATION, processAppName) == null) { return; } //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String operationName = "Undeployment of Process Application " + processAppName; string operationName = "Undeployment of Process Application " + processAppName; // perform the undeployment serviceContainer.createUndeploymentOperation(operationName).addAttachment(Attachments.PROCESS_APPLICATION, processApplication).addSteps(UndeploymentSteps).execute(); LOG.paUndeployed(processApplication.Name); }
public virtual void testStartService() { // initially the service is not present: assertNull(serviceContainer.getService(service1ObjectName)); // we can start a service serviceContainer.startService(service1Name, service1); // and get it after that assertNotNull(serviceContainer.getService(service1ObjectName)); assertEquals(service1, serviceContainer.getService(service1ObjectName)); // as long it is started, I cannot start a second service with the same name: try { serviceContainer.startService(service1Name, service1); fail("exception expected"); } catch (Exception e) { assertTrue(e.Message.contains("service with same name already registered")); } // but, I can start a service with a different name: serviceContainer.startService(service2Name, service2); // and get it after that assertNotNull(serviceContainer.getService(service2ObjectName)); }