1 61 62 package org.apache.commons.dbutils; 63 64 import java.io.IOException ; 65 import java.util.Map ; 66 67 72 public class QueryLoaderTest extends BaseTestCase { 73 74 private static final String QUERIES = 75 "/org/apache/commons/dbutils/TestQueries.properties"; 76 77 80 public QueryLoaderTest(String name) { 81 super(name); 82 } 83 84 public void testLoad() throws IOException { 85 try { 86 QueryLoader loader = QueryLoader.instance(); 87 Map q = loader.load(QUERIES); 88 Map q2 = loader.load(QUERIES); 89 assertTrue(q == q2); assertEquals("SELECT * FROM SomeTable", q.get("test.query")); 91 92 loader.unload(QUERIES); 93 Map q3 = loader.load(QUERIES); 94 assertTrue(q != q3); 96 } catch (IllegalArgumentException e) { 97 } 101 } 102 103 } 104 | Popular Tags |