1 23 24 29 package com.sun.enterprise.management.config; 30 31 import java.util.Map ; 32 import java.util.HashMap ; 33 34 import javax.management.ObjectName ; 35 36 37 import com.sun.enterprise.management.AMXTestBase; 38 import com.sun.enterprise.management.Capabilities; 39 40 import com.sun.appserv.management.config.ModuleMonitoringLevelsConfig; 41 import com.sun.appserv.management.config.MonitoringServiceConfig; 42 43 44 46 public final class ModuleMonitoringLevelsConfigTest extends AMXTestBase 47 { 48 public 49 ModuleMonitoringLevelsConfigTest () 50 { 51 } 52 53 public void 54 testGetAll() 55 { 56 final ModuleMonitoringLevelsConfig config = getModuleMonitoringLevelsConfig(); 57 58 final Map <String ,String > all = config.getAllLevels(); 59 assert( all.size() == 11 ); 60 } 61 62 63 public void 64 testCreateRemove() 65 { 66 ModuleMonitoringLevelsConfig existing = getModuleMonitoringLevelsConfig(); 67 68 final MonitoringServiceConfig mon = getConfigConfig().getMonitoringServiceConfig(); 69 mon.removeModuleMonitoringLevelsConfig(); 70 final ModuleMonitoringLevelsConfig newMM = 71 mon.createModuleMonitoringLevelsConfig( null ); 72 73 newMM.changeAll( "HIGH" ); 74 } 75 } 76 77 78 | Popular Tags |