Code example for LogRecord

0
 
public class OldFormatterTest extends TestCase {
    static String MSG = "msg, pls. ignore it";
 
    Formatter f = new MockFormatter();
    LogRecord r = new LogRecord(Level.FINE, MSG);
    FileHandler h;
 
    @Override protected void setUp() throws Exception { 
        super.setUp(); 
        h = new FileHandler();
    } 
 
    public void testFormatter() { 
        assertEquals("head string is not empty", "", f.getHead(null));
        assertEquals("tail string is not empty", "", f.getTail(null));
 
    } 
 
    public void testGetHead() { 
        assertEquals("head string is not empty", "", f.getHead(null));