1 package com.tonbeller.wcf.log; 2 3 import java.io.File ; 4 import java.util.Locale ; 5 6 import junit.framework.TestCase; 7 8 11 public class LogFormTest extends TestCase { 12 public void testAddConfig() throws Exception { 13 String logDirName = System.getProperty("java.io.tmpdir"); 14 File f = new File (logDirName, "testadd.properties"); 15 f.delete(); 16 Locale locale = Locale.GERMANY; 17 String context = "test"; 18 LogHandler lh = new LogHandler(logDirName, locale, context); 19 int n = lh.getConfigNames().length; 20 lh.addConfig("/com/tonbeller/wcf/log/testadd", "TestAdd"); 21 assertEquals(n + 1, lh.getConfigNames().length); 22 assertEquals("TestAdd", lh.getLabel("testadd")); 23 } 24 } 25 | Popular Tags |