RemoteWebserviceClientBuilderImpl() { this.config = new RemoteConfiguration(Type.WS); }
RemoteRestRuntimeEngineBuilderImpl() { this.config = new RemoteConfiguration(Type.REST); }
public RemoteConfiguration clone() { return new RemoteConfiguration(this); }
/** * builder logic: * * - Queues: * 1. User submits them * 2. Retrieved via remote initial context * * - Factory * 1. if ssl: created here (with keystore, etc. ) * 2. User submits host/port (create own) * 3. User submits remote initial context * 4. User submits it */ RemoteJmsRuntimeEngineBuilderImpl() { this.config = new RemoteConfiguration(Type.JMS); }
RemoteConfiguration config = new RemoteConfiguration("adsf", "user", "pwd" ); config.setServerBaseRestUrl(new URL("http://localhost:80808"));
RemoteConfiguration config = new RemoteConfiguration(RemoteConfiguration.Type.CONSTRUCTOR); TaskServiceClientCommandObject taskServiceClient = new TaskServiceClientCommandObject(config); TaskServiceClientCommandObject taskServiceClientSpy = spy(taskServiceClient);
@Test public void addPossiblyNullObjectTest() throws Throwable { RemoteConfiguration config = new RemoteConfiguration(RemoteConfiguration.Type.CONSTRUCTOR); TaskServiceClientCommandObject taskServiceClient = new TaskServiceClientCommandObject(config); List<Object> objectList = new ArrayList<Object>();
@Test public void remoteConfigurationCloneTest() throws Exception { RemoteConfiguration orig = new RemoteConfiguration("deploy", mock(ConnectionFactory.class), mock(Queue.class), mock(Queue.class), mock(Queue.class), "user", "pass"); orig.setExtraJaxbClasses(new HashSet<Class<?>>()); orig.setProcessInstanceId(123l); orig.setRemoteInitialContext(remoteInitialContext); orig.setTimeout(23l); orig.setUseSsl(false); setField(orig, "jmsSerializationType", 4); RemoteConfiguration copy = orig.clone(); Field[] fields = RemoteConfiguration.class.getDeclaredFields(); for( Field field : fields ) { field.setAccessible(true); Object origVal = field.get(orig); assertNotNull( field.getName() + " should be set to a non-null value to be compared."); assertEquals( field.getName() + " not equal in RemoteConfiguration clone.", origVal, field.get(copy)); } }
@Test public void remoteConfigurationCloneTest() throws Exception { RemoteConfiguration orig = new RemoteConfiguration("deploy", mock(ConnectionFactory.class), mock(Queue.class), mock(Queue.class), mock(Queue.class), "user", "pass"); orig.setExtraJaxbClasses(new HashSet<Class<?>>()); orig.setProcessInstanceId(123l); orig.setRemoteInitialContext(remoteInitialContext); orig.setTimeout(23l); orig.setUseSsl(false); setField(orig, "jmsSerializationType", 4); RemoteConfiguration copy = orig.clone(); Field[] fields = RemoteConfiguration.class.getDeclaredFields(); for( Field field : fields ) { field.setAccessible(true); Object origVal = field.get(orig); assertNotNull( field.getName() + " should be set to a non-null value to be compared."); assertEquals( field.getName() + " not equal in RemoteConfiguration clone.", origVal, field.get(copy)); } }
@Test public void remoteConfigurationCloneTest() throws Exception { RemoteConfiguration orig = new RemoteConfiguration("deploy", mock(ConnectionFactory.class), mock(Queue.class), mock(Queue.class), mock(Queue.class), "user", "pass"); orig.setExtraJaxbClasses(new HashSet<Class<?>>()); orig.setProcessInstanceId(123l); orig.setRemoteInitialContext(remoteInitialContext); orig.setTimeout(23l); orig.setUseSsl(false); setField(orig, "jmsSerializationType", 4); setField(orig, "requestFactory", mock(ClientRequestFactory.class)); RemoteConfiguration copy = orig.clone(); Field[] fields = RemoteConfiguration.class.getDeclaredFields(); for( Field field : fields ) { field.setAccessible(true); Object origVal = field.get(orig); assertNotNull( field.getName() + " should be set to a non-null value to be compared."); assertEquals( field.getName() + " not equal in RemoteConfiguration clone.", origVal, field.get(copy)); } }