@Test public void testLoadRules_noAutonomicDir() throws Exception { TestApplication app = new TestApplication(); app.setDirectory( this.folder.newFolder()); Assert.assertEquals( 0, this.autonomicMngr.appNameToContext.size()); this.autonomicMngr.loadApplicationRules( app ); Assert.assertEquals( 1, this.autonomicMngr.appNameToContext.size()); AutonomicApplicationContext ctx = this.autonomicMngr.appNameToContext.get( app.getName()); Assert.assertNotNull( ctx ); Assert.assertEquals( 0, ctx.ruleNameToRule.size()); }
@Override public void loadApplicationRules( Application app ) { AutonomicApplicationContext ctx = new AutonomicApplicationContext( app ); loadRule( app, ctx, null ); this.appNameToContext.put( app.getName(), ctx ); }
AutonomicMngrImpl implements IAutonomicMngr { @Override public void loadApplicationRules( Application app ) { AutonomicApplicationContext ctx = new AutonomicApplicationContext( app ); loadRule( app, ctx, null ); this.appNameToContext.put( app.getName(), ctx ); } }
AutonomicMngrImpl implements IAutonomicMngr { @Override public void loadApplicationRules( Application app ) { AutonomicApplicationContext ctx = new AutonomicApplicationContext( app ); loadRule( app, ctx, null ); this.appNameToContext.put( app.getName(), ctx ); } AutonomicMngrImpl( ICommandsMngr commandsMngr ); }
AutonomicMngrImpl implements IAutonomicMngr { @Override public void loadApplicationRules( Application app ) { AutonomicApplicationContext ctx = new AutonomicApplicationContext( app ); loadRule( app, ctx, null ); this.appNameToContext.put( app.getName(), ctx ); } AutonomicMngrImpl( ICommandsMngr commandsMngr ); void setPreferencesMngr( IPreferencesMngr preferencesMngr ); @Override void loadApplicationRules( Application app ); @Override void refreshApplicationRules( Application app, String ruleFileName ); @Override void unloadApplicationRules( Application app ); @Override void notifyVmWasDeletedByHand( Instance rootInstance ); @Override int getAutonomicInstancesCount(); @Override void handleEvent( ManagedApplication ma, MsgNotifAutonomic event ); }
AutonomicMngrImpl implements IAutonomicMngr { @Override public void loadApplicationRules( Application app ) { AutonomicApplicationContext ctx = new AutonomicApplicationContext( app ); loadRule( app, ctx, null ); this.appNameToContext.put( app.getName(), ctx ); } AutonomicMngrImpl( ICommandsMngr commandsMngr ); void setPreferencesMngr( IPreferencesMngr preferencesMngr ); @Override void loadApplicationRules( Application app ); @Override void refreshApplicationRules( Application app, String ruleFileName ); @Override void unloadApplicationRules( Application app ); @Override void notifyVmWasDeletedByHand( Instance rootInstance ); @Override int getAutonomicInstancesCount(); @Override void handleEvent( ManagedApplication ma, MsgNotifAutonomic event );  }