public void sendChat(final String message, final LogLevel logLevel) { if (getVerbosity().willLog(logLevel)) { super.sendChat(message); } } }
result.append(" Config: ").append(((Princess) botClient).getBehaviorSettings().getDescription()).append ("."); result.append(" Verbosity: ").append(((Princess) botClient).getVerbosity()).append(".");
if (!LogLevel.DEBUG.equals(owner.getVerbosity())) { return null;
"-b:Princess", "-c:" + ((Princess) botClient).getBehaviorSettings().getDescription(), "-v:" + ((Princess) botClient).getVerbosity(), "-p:" + player };
Mockito.doReturn(new HashSet<Integer>()).when(mockPrincess).getPriorityUnitTargets(); Mockito.doCallRealMethod().when(mockPrincess).getBehaviorSettings(); Mockito.doCallRealMethod().when(mockPrincess).getVerbosity();
" - Best Firing Plan: " + plan.getDebugDescription(LogLevel.DEBUG == getVerbosity()));
msg = "Verbosity set to " + princess.getVerbosity().toString(); princess.log(getClass(), METHOD_NAME, LogLevel.DEBUG, msg); princess.sendChat(msg);
if (getVerbosity().willLog(LogLevel.INFO)) { String timeestimate = "unknown."; if (0 != thisTimeEstimate) {
if (!LogLevel.DEBUG.equals(owner.getVerbosity())) { return null;
Mockito.doNothing().when(mockPrincess).sendChat(Matchers.anyString()); testChatProcessor.additionalPrincessCommands(mockChatEvent, mockPrincess); Assert.assertEquals(LogLevel.INFO, mockPrincess.getVerbosity()); Mockito.doNothing().when(mockPrincess).sendChat(Matchers.anyString()); testChatProcessor.additionalPrincessCommands(mockChatEvent, mockPrincess); Assert.assertEquals(LogLevel.WARNING, mockPrincess.getVerbosity()); Mockito.doNothing().when(mockPrincess).sendChat(Matchers.anyString()); testChatProcessor.additionalPrincessCommands(mockChatEvent, mockPrincess); Assert.assertEquals(LogLevel.WARNING, mockPrincess.getVerbosity()); Mockito.doNothing().when(mockPrincess).sendChat(Matchers.anyString()); testChatProcessor.additionalPrincessCommands(mockChatEvent, mockPrincess); Assert.assertEquals(LogLevel.INFO, mockPrincess.getVerbosity());
if (!LogLevel.DEBUG.equals(owner.getVerbosity())) { return null;