Browse Source

Fix unit tests not compiling

Change-Id: I1714342aa223c2cc9d6d995c36e90961804cb975
Reviewed-on: http://gerrit.dmdirc.com/1138
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4rc1
Chris Smith 14 years ago
parent
commit
b218425541

+ 5
- 0
test/com/dmdirc/harness/TestCommandParser.java View File

@@ -66,4 +66,9 @@ public class TestCommandParser extends CommandParser {
66 66
                                         CommandArguments args) {
67 67
         invalidCommand = args.getCommandName();
68 68
     }
69
+
70
+    @Override
71
+    public void setOwner(FrameContainer owner) {
72
+        // Don't care
73
+    }
69 74
 }

+ 11
- 3
test/com/dmdirc/harness/TestWritableFrameContainer.java View File

@@ -24,6 +24,7 @@ package com.dmdirc.harness;
24 24
 
25 25
 import com.dmdirc.Server;
26 26
 import com.dmdirc.WritableFrameContainer;
27
+import com.dmdirc.commandparser.parsers.GlobalCommandParser;
27 28
 import com.dmdirc.config.ConfigManager;
28 29
 import com.dmdirc.config.IdentityManager;
29 30
 import com.dmdirc.ui.WindowManager;
@@ -34,8 +35,9 @@ public class TestWritableFrameContainer extends WritableFrameContainer {
34 35
     public InputWindow window = null;
35 36
     private final int lineLength;
36 37
 
37
-    public TestWritableFrameContainer(final int lineLength, final ConfigManager cm) {
38
-        super("raw", "Raw", "(Raw)", cm);
38
+    public TestWritableFrameContainer(final int lineLength,
39
+            final ConfigManager cm) {
40
+        super("raw", "Raw", "(Raw)", cm, GlobalCommandParser.getGlobalCommandParser());
39 41
 
40 42
         this.lineLength = lineLength;
41 43
     }
@@ -44,27 +46,33 @@ public class TestWritableFrameContainer extends WritableFrameContainer {
44 46
         this(lineLength, IdentityManager.getGlobalConfig());
45 47
     }
46 48
 
49
+    @Override
47 50
     public void sendLine(final String line) {
48 51
         // Do nothing
49 52
     }
50 53
 
54
+    @Override
51 55
     public InputWindow getFrame() {
52 56
         return window;
53 57
     }
54 58
 
59
+    @Override
55 60
     public int getMaxLineLength() {
56 61
         return lineLength;
57 62
     }
58 63
 
64
+    @Override
59 65
     public void windowClosing() {
60 66
         System.out.println("windowClosing");
61
-        WindowManager.removeWindow(window);
67
+        WindowManager.removeWindow(this);
62 68
     }
63 69
 
70
+    @Override
64 71
     public void windowClosed() {
65 72
         // DO nothing
66 73
     }
67 74
 
75
+    @Override
68 76
     public Server getServer() {
69 77
         return null;
70 78
     }

Loading…
Cancel
Save