|
@@ -22,6 +22,7 @@
|
22
|
22
|
|
23
|
23
|
package com.dmdirc.actions;
|
24
|
24
|
|
|
25
|
+import com.dmdirc.Server;
|
25
|
26
|
import com.dmdirc.config.IdentityManager;
|
26
|
27
|
|
27
|
28
|
import org.junit.BeforeClass;
|
|
@@ -114,6 +115,27 @@ public class ActionComponentChainTest {
|
114
|
115
|
public void testEmptyToString() {
|
115
|
116
|
final ActionComponentChain chain = new ActionComponentChain(String.class, "");
|
116
|
117
|
chain.toString();
|
117
|
|
- }
|
|
118
|
+ }
|
|
119
|
+
|
|
120
|
+ @Test()
|
|
121
|
+ public void testRequiresConnection1() {
|
|
122
|
+ final ActionComponentChain chain = new ActionComponentChain(Server.class,
|
|
123
|
+ "SERVER_NETWORK");
|
|
124
|
+ assertTrue(chain.requiresConnection());
|
|
125
|
+ }
|
|
126
|
+
|
|
127
|
+ @Test()
|
|
128
|
+ public void testRequiresConnection2() {
|
|
129
|
+ final ActionComponentChain chain = new ActionComponentChain(Server.class,
|
|
130
|
+ "SERVER_NETWORK.STRING_LENGTH");
|
|
131
|
+ assertTrue(chain.requiresConnection());
|
|
132
|
+ }
|
|
133
|
+
|
|
134
|
+ @Test()
|
|
135
|
+ public void testRequiresConnection3() {
|
|
136
|
+ final ActionComponentChain chain = new ActionComponentChain(Server.class,
|
|
137
|
+ "SERVER_NAME.STRING_LENGTH");
|
|
138
|
+ assertFalse(chain.requiresConnection());
|
|
139
|
+ }
|
118
|
140
|
|
119
|
141
|
}
|