Browse Source

Add JUnit lib, fix unit tests

master
Chris Smith 15 years ago
parent
commit
f52dedb348

BIN
lib/junit-4.5.jar View File


+ 2
- 1
nbproject/project.properties View File

@@ -24,6 +24,7 @@ file.reference.derby.jar=lib/derby.jar
24 24
 file.reference.jaxen-core.jar=lib/jaxen-core.jar
25 25
 file.reference.jaxen-jdom.jar=lib/jaxen-jdom.jar
26 26
 file.reference.jdom.jar=lib/jdom.jar
27
+file.reference.junit-4.5.jar=lib/junit-4.5.jar
27 28
 file.reference.miglayout-3.6.2.jar=lib/miglayout-3.6.2.jar
28 29
 file.reference.saxpath.jar=lib/saxpath.jar
29 30
 file.reference.xalan.jar=lib/xalan.jar
@@ -49,7 +50,7 @@ javac.target=1.5
49 50
 javac.test.classpath=\
50 51
     ${javac.classpath}:\
51 52
     ${build.classes.dir}:\
52
-    ${libs.junit_4.classpath}
53
+    ${file.reference.junit-4.5.jar}
53 54
 javadoc.additionalparam=
54 55
 javadoc.author=false
55 56
 javadoc.encoding=${source.encoding}

+ 2
- 1
src/uk/co/md87/evetool/ui/ContentPanel.java View File

@@ -24,10 +24,11 @@ package uk.co.md87.evetool.ui;
24 24
 
25 25
 import java.awt.CardLayout;
26 26
 import java.util.Map;
27
+
27 28
 import javax.swing.BorderFactory;
28 29
 import javax.swing.JPanel;
29
-
30 30
 import javax.swing.JScrollPane;
31
+
31 32
 import uk.co.md87.evetool.AccountManager;
32 33
 import uk.co.md87.evetool.ApiFactory;
33 34
 import uk.co.md87.evetool.ui.data.AccountChar;

+ 2
- 1
test/uk/co/md87/evetool/api/EveApiTest.java View File

@@ -26,6 +26,7 @@ import java.sql.Connection;
26 26
 import java.sql.DriverManager;
27 27
 import java.sql.SQLException;
28 28
 import org.junit.Test;
29
+import uk.co.md87.evetool.api.io.DBCache;
29 30
 import static org.junit.Assert.*;
30 31
 
31 32
 /**
@@ -47,7 +48,7 @@ public class EveApiTest {
47 48
             conn.createStatement().execute("DROP TABLE PAGECACHE");
48 49
         }
49 50
         
50
-        final EveApi api = new EveApi(conn);
51
+        final EveApi api = new EveApi(new DBCache(conn));
51 52
         assertTrue(conn.getMetaData().getTables(null, null, "PAGECACHE", null).next());
52 53
     }
53 54
 

+ 1
- 1
test/uk/co/md87/evetool/api/io/DBCacheTest.java View File

@@ -45,8 +45,8 @@ public class DBCacheTest {
45 45
     public void testBasicInsert() throws SQLException {
46 46
         final Map<String, String> args = new HashMap<String, String>();
47 47
         final Connection conn = DriverManager.getConnection(dbURL);
48
-        new EveApi(conn); // To create tables
49 48
         final DBCache cache = new DBCache(conn);
49
+        new EveApi(cache); // To create tables
50 50
 
51 51
         args.put("foo", "bar");
52 52
         args.put("rand", String.valueOf(System.currentTimeMillis()));

Loading…
Cancel
Save