@Test public void testNothingSetNothingChanges() { Config config = Config.createConfig(); Config config2 = Config.createConfig(); delegate.applyDelegate(config); assertTrue(EqualsBuilder.reflectionEquals(config, config2, "keyStore", "ourCertificate")); }
@Override public void applyDelegate(Config config) { if (transportHandlerType == null) { return; } if (config.getDefaultClientConnection() == null) { config.setDefaultClientConnection(new OutboundConnection()); } if (config.getDefaultServerConnection() == null) { config.setDefaultServerConnection(new InboundConnection()); } config.getDefaultClientConnection().setTransportHandlerType(transportHandlerType); config.getDefaultServerConnection().setTransportHandlerType(transportHandlerType); }
TransportHandlerDelegate extends Delegate { @Override public void applyDelegate(Config config) { if (transportHandlerType == null) { return; } if (config.getDefaultClientConnection() == null) { config.setDefaultClientConnection(new OutboundConnection()); } if (config.getDefaultServerConnection() == null) { config.setDefaultServerConnection(new InboundConnection()); } config.getDefaultClientConnection().setTransportHandlerType(transportHandlerType); config.getDefaultServerConnection().setTransportHandlerType(transportHandlerType); } }
TransportHandlerDelegate extends Delegate { @Override public void applyDelegate(Config config) { if (transportHandlerType == null) { return; } if (config.getDefaultClientConnection() == null) { config.setDefaultClientConnection(new OutboundConnection()); } if (config.getDefaultServerConnection() == null) { config.setDefaultServerConnection(new InboundConnection()); } config.getDefaultClientConnection().setTransportHandlerType(transportHandlerType); config.getDefaultServerConnection().setTransportHandlerType(transportHandlerType); } TransportHandlerDelegate(); }
TransportHandlerDelegate extends Delegate { @Override public void applyDelegate(Config config) { if (transportHandlerType == null) { return; } if (config.getDefaultClientConnection() == null) { config.setDefaultClientConnection(new OutboundConnection()); } if (config.getDefaultServerConnection() == null) { config.setDefaultServerConnection(new InboundConnection()); } config.getDefaultClientConnection().setTransportHandlerType(transportHandlerType); config.getDefaultServerConnection().setTransportHandlerType(transportHandlerType); } TransportHandlerDelegate(); TransportHandlerType getTransportHandlerType(); void setTransportHandlerType(TransportHandlerType transportHandlerType); @Override void applyDelegate(Config config); }
TransportHandlerDelegate extends Delegate { @Override public void applyDelegate(Config config) { if (transportHandlerType == null) { return; } if (config.getDefaultClientConnection() == null) { config.setDefaultClientConnection(new OutboundConnection()); } if (config.getDefaultServerConnection() == null) { config.setDefaultServerConnection(new InboundConnection()); } config.getDefaultClientConnection().setTransportHandlerType(transportHandlerType); config.getDefaultServerConnection().setTransportHandlerType(transportHandlerType); } TransportHandlerDelegate(); TransportHandlerType getTransportHandlerType(); void setTransportHandlerType(TransportHandlerType transportHandlerType); @Override void applyDelegate(Config config);  }