1 package org.objectweb.celtix.bus.transports.https; 2 3 import java.util.logging.Handler ; 4 import java.util.logging.LogRecord ; 5 6 7 class TestHandler extends Handler { 8 String log; 9 10 public TestHandler() { 11 log = ""; 12 } 13 14 15 public void publish(LogRecord record) { 16 log += record.getMessage(); 17 18 } 19 20 21 public void flush() { 22 23 } 24 25 public void close() throws SecurityException { 26 27 } 28 29 boolean checkLogContainsString(String str) { 30 if (log.indexOf(str) == -1) { 31 return false; 32 } 33 return true; 34 } 35 36 } | Popular Tags |