@Test public void testReportCandidate_noConfigScript() throws Exception { TestApplication app = new TestApplication(); app.setName( "app" ); TargetHandlerParameters parameters = new TargetHandlerParameters() .applicationName( app.getName()) .scopedInstancePath( InstanceHelpers.computeInstancePath( app.getMySqlVm())) .domain( "domain" ) .targetConfigurationScript( null ); this.targetConfigurator.reportCandidate( parameters, app.getMySqlVm()); Assert.assertEquals( 1, this.targetConfigurator.candidates.size()); }
@Override public void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ) { String key = parameters.getApplicationName() + "_" + parameters.getScopedInstancePath(); this.candidates.put( key, new TargetConfiugrationBean( parameters, scopedInstance )); }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ) { String key = parameters.getApplicationName() + "_" + parameters.getScopedInstancePath(); this.candidates.put( key, new TargetConfiugrationBean( parameters, scopedInstance )); } }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ) { String key = parameters.getApplicationName() + "_" + parameters.getScopedInstancePath(); this.candidates.put( key, new TargetConfiugrationBean( parameters, scopedInstance )); }  }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ) { String key = parameters.getApplicationName() + "_" + parameters.getScopedInstancePath(); this.candidates.put( key, new TargetConfiugrationBean( parameters, scopedInstance )); }  @Override void start(); @Override void stop(); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); @Override void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void cancelCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void verifyCandidates(); }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ) { String key = parameters.getApplicationName() + "_" + parameters.getScopedInstancePath(); this.candidates.put( key, new TargetConfiugrationBean( parameters, scopedInstance )); }  @Override void start(); @Override void stop(); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); @Override void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void cancelCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void verifyCandidates();  }