|
@@ -28,8 +28,8 @@ import com.dmdirc.commandparser.CommandArguments;
|
28
|
28
|
import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
|
29
|
29
|
import com.dmdirc.interfaces.CommandController;
|
30
|
30
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
31
|
|
-import com.dmdirc.parser.irc.IRCChannelClientInfo;
|
32
|
|
-import com.dmdirc.parser.irc.IRCChannelInfo;
|
|
31
|
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
|
|
32
|
+import com.dmdirc.parser.interfaces.ChannelInfo;
|
33
|
33
|
|
34
|
34
|
import org.junit.Before;
|
35
|
35
|
import org.junit.Test;
|
|
@@ -37,7 +37,13 @@ import org.junit.runner.RunWith;
|
37
|
37
|
import org.mockito.Mock;
|
38
|
38
|
import org.mockito.runners.MockitoJUnitRunner;
|
39
|
39
|
|
40
|
|
-import static org.mockito.Mockito.*;
|
|
40
|
+import static org.mockito.Mockito.anyChar;
|
|
41
|
+import static org.mockito.Mockito.anyString;
|
|
42
|
+import static org.mockito.Mockito.eq;
|
|
43
|
+import static org.mockito.Mockito.matches;
|
|
44
|
+import static org.mockito.Mockito.mock;
|
|
45
|
+import static org.mockito.Mockito.verify;
|
|
46
|
+import static org.mockito.Mockito.when;
|
41
|
47
|
|
42
|
48
|
@RunWith(MockitoJUnitRunner.class)
|
43
|
49
|
public class KickReasonTest {
|
|
@@ -65,7 +71,7 @@ public class KickReasonTest {
|
65
|
71
|
@Test
|
66
|
72
|
public void testUnknown() {
|
67
|
73
|
final FrameContainer tiw = mock(FrameContainer.class);
|
68
|
|
- final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
|
|
74
|
+ final ChannelInfo channelInfo = mock(ChannelInfo.class);
|
69
|
75
|
final Channel channel = mock(Channel.class);
|
70
|
76
|
|
71
|
77
|
when(channel.getChannelInfo()).thenReturn(channelInfo);
|
|
@@ -80,9 +86,9 @@ public class KickReasonTest {
|
80
|
86
|
@Test
|
81
|
87
|
public void testWithReason() {
|
82
|
88
|
final FrameContainer tiw = mock(FrameContainer.class);
|
83
|
|
- final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
|
|
89
|
+ final ChannelInfo channelInfo = mock(ChannelInfo.class);
|
84
|
90
|
final Channel channel = mock(Channel.class);
|
85
|
|
- final IRCChannelClientInfo cci = mock(IRCChannelClientInfo.class);
|
|
91
|
+ final ChannelClientInfo cci = mock(ChannelClientInfo.class);
|
86
|
92
|
|
87
|
93
|
when(channel.getChannelInfo()).thenReturn(channelInfo);
|
88
|
94
|
when(channelInfo.getChannelClient("user1")).thenReturn(cci);
|
|
@@ -97,9 +103,9 @@ public class KickReasonTest {
|
97
|
103
|
public void testWithoutReason() {
|
98
|
104
|
final FrameContainer tiw = mock(FrameContainer.class);
|
99
|
105
|
final AggregateConfigProvider manager = mock(AggregateConfigProvider.class);
|
100
|
|
- final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
|
|
106
|
+ final ChannelInfo channelInfo = mock(ChannelInfo.class);
|
101
|
107
|
final Channel channel = mock(Channel.class);
|
102
|
|
- final IRCChannelClientInfo cci = mock(IRCChannelClientInfo.class);
|
|
108
|
+ final ChannelClientInfo cci = mock(ChannelClientInfo.class);
|
103
|
109
|
|
104
|
110
|
when(tiw.getConfigManager()).thenReturn(manager);
|
105
|
111
|
when(channel.getChannelInfo()).thenReturn(channelInfo);
|