Browse Source

Merge pull request #467 from csmith/master

Fix a couple of tests.
pull/468/head
Greg Holmes 8 years ago
parent
commit
ce7e2a353f

+ 3
- 0
channelwho/test/com/dmdirc/addons/channelwho/ConnectionHandlerTest.java View File

102
         instance = new ConnectionHandler(config, scheduledExecutorService, connectionManager,
102
         instance = new ConnectionHandler(config, scheduledExecutorService, connectionManager,
103
                 "domain", connection);
103
                 "domain", connection);
104
         instance.handleWhoInterval(5);
104
         instance.handleWhoInterval(5);
105
+
106
+        when(serverNumericEvent.getConnection()).thenReturn(connection);
107
+        when(channelUserAwayEvent.getChannel()).thenReturn(groupChat);
105
     }
108
     }
106
 
109
 
107
     @Test
110
     @Test

+ 3
- 0
jpq/test/com/dmdirc/addons/jpq/GroupChatHandlerTest.java View File

62
         when(windowModel.getConfigManager()).thenReturn(configProvider);
62
         when(windowModel.getConfigManager()).thenReturn(configProvider);
63
         when(configProvider.getBinder()).thenReturn(configBinder);
63
         when(configProvider.getBinder()).thenReturn(configBinder);
64
         when(configBinder.withDefaultDomain("domain")).thenReturn(configBinder);
64
         when(configBinder.withDefaultDomain("domain")).thenReturn(configBinder);
65
+        when(channelJoinEvent.getChannel()).thenReturn(groupChat);
66
+        when(channelPartEvent.getChannel()).thenReturn(groupChat);
67
+        when(channelQuitEvent.getChannel()).thenReturn(groupChat);
65
         instance = new GroupChatHandler("domain", groupChat);
68
         instance = new GroupChatHandler("domain", groupChat);
66
     }
69
     }
67
 
70
 

Loading…
Cancel
Save