Browse Source

Fix some unit tests

Change-Id: I2f14be0cecbc842b23dc3c99b5df257b8e6b0d53
Reviewed-on: http://gerrit.dmdirc.com/390
Reviewed-by: Gregory Holmes <greboid@dmdirc.com>
Tested-by: Gregory Holmes <greboid@dmdirc.com>
tags/0.6.3b1
Chris Smith 14 years ago
parent
commit
b6e02f0a30

+ 3
- 3
test/com/dmdirc/actions/ActionComponentChainTest.java View File

@@ -24,14 +24,14 @@ package com.dmdirc.actions;
24 24
 
25 25
 import com.dmdirc.config.IdentityManager;
26 26
 
27
-import org.junit.Before;
27
+import org.junit.BeforeClass;
28 28
 import org.junit.Test;
29 29
 import static org.junit.Assert.*;
30 30
 
31 31
 public class ActionComponentChainTest {
32 32
 
33
-    @Before
34
-    public void setUp() throws Exception {
33
+    @BeforeClass
34
+    public static void setUp() throws Exception {
35 35
         IdentityManager.load();
36 36
         ActionManager.init();
37 37
     }

+ 1
- 2
test/com/dmdirc/config/ConfigSourceTest.java View File

@@ -22,7 +22,6 @@
22 22
 package com.dmdirc.config;
23 23
 
24 24
 import com.dmdirc.harness.TestConfigSource;
25
-import java.awt.Color;
26 25
 import org.junit.Test;
27 26
 import static org.junit.Assert.*;
28 27
 
@@ -38,7 +37,7 @@ public class ConfigSourceTest {
38 37
     
39 38
     @Test
40 39
     public void testGetInt() {
41
-        assertEquals(42, s.getOptionInt("true", "42"));
40
+        assertEquals(42, s.getOptionInt("true", "42").intValue());
42 41
     }
43 42
     
44 43
     @Test

+ 1
- 1
test/com/dmdirc/ui/messages/StyliserStylesTest.java View File

@@ -63,7 +63,7 @@ public class StyliserStylesTest {
63 63
         final StringBuilder builder = new StringBuilder();
64 64
         Styliser.addStyledString(doc, new String[]{input});
65 65
         final AttributedCharacterIterator aci = Utils.getAttributedString(
66
-                new String[]{input, }, IdentityManager.getGlobalConfig()).
66
+                new String[]{input, }, "dialog", 12).
67 67
                 getAttributedString().getIterator();
68 68
          
69 69
         Map<AttributedCharacterIterator.Attribute, Object> map = null;

Loading…
Cancel
Save