@Test public void testGetLevel() { Level level = loggingLevelMapper.getLevel("INFO"); assertEquals(Level.INFO, level); level = loggingLevelMapper.getLevel("XXX"); assertEquals(Level.ALL, level); }
public Level getLevel(String level) { if (level.equals("INFO")) { return Level.INFO; } else if (level.equals("FINE")) { return Level.FINE; } else if (level.equals("FINER")) { return Level.FINER; } else if (level.equals("FINEST")) { return Level.FINEST; } else if (level.equals("WARNING")) { return Level.WARNING; } else if (level.equals("SEVERE")) { return Level.SEVERE; } else { return Level.ALL; } }
LoggingLevelMapper { public Level getLevel(String level) { if (level.equals("INFO")) { return Level.INFO; } else if (level.equals("FINE")) { return Level.FINE; } else if (level.equals("FINER")) { return Level.FINER; } else if (level.equals("FINEST")) { return Level.FINEST; } else if (level.equals("WARNING")) { return Level.WARNING; } else if (level.equals("SEVERE")) { return Level.SEVERE; } else { return Level.ALL; } } }
LoggingLevelMapper { public Level getLevel(String level) { if (level.equals("INFO")) { return Level.INFO; } else if (level.equals("FINE")) { return Level.FINE; } else if (level.equals("FINER")) { return Level.FINER; } else if (level.equals("FINEST")) { return Level.FINEST; } else if (level.equals("WARNING")) { return Level.WARNING; } else if (level.equals("SEVERE")) { return Level.SEVERE; } else { return Level.ALL; } }  }
LoggingLevelMapper { public Level getLevel(String level) { if (level.equals("INFO")) { return Level.INFO; } else if (level.equals("FINE")) { return Level.FINE; } else if (level.equals("FINER")) { return Level.FINER; } else if (level.equals("FINEST")) { return Level.FINEST; } else if (level.equals("WARNING")) { return Level.WARNING; } else if (level.equals("SEVERE")) { return Level.SEVERE; } else { return Level.ALL; } }  Level getLevel(String level); }
LoggingLevelMapper { public Level getLevel(String level) { if (level.equals("INFO")) { return Level.INFO; } else if (level.equals("FINE")) { return Level.FINE; } else if (level.equals("FINER")) { return Level.FINER; } else if (level.equals("FINEST")) { return Level.FINEST; } else if (level.equals("WARNING")) { return Level.WARNING; } else if (level.equals("SEVERE")) { return Level.SEVERE; } else { return Level.ALL; } }  Level getLevel(String level);  }