Skip to content
Snippets Groups Projects
Commit 02db2a66 authored by Manuel Leduc's avatar Manuel Leduc
Browse files

XCOMMONS-3052: Add support for implementing Netflux channel bots as components

Fix missing parameters in Channel constructor.

(cherry picked from commit 85a705ef)
parent 99182b77
No related branches found
Tags 0.56.0-rc.4
No related merge requests found
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
/** /**
* Unit tests for {@link DefaultEntityChannelStore}. * Unit tests for {@link DefaultEntityChannelStore}.
* *
* @version $Id$ * @version $Id$
*/ */
@ComponentTest @ComponentTest
...@@ -64,7 +64,7 @@ void createAndGetChannel() ...@@ -64,7 +64,7 @@ void createAndGetChannel()
assertFalse(this.entityChannelStore.getChannel(entityReference, path).isPresent()); assertFalse(this.entityChannelStore.getChannel(entityReference, path).isPresent());
// Create the channel. // Create the channel.
Channel channel = new Channel(); Channel channel = new Channel("test");
when(this.channelStore.create()).thenReturn(channel); when(this.channelStore.create()).thenReturn(channel);
EntityChannel entityChannel = this.entityChannelStore.createChannel(entityReference, path); EntityChannel entityChannel = this.entityChannelStore.createChannel(entityReference, path);
...@@ -97,18 +97,18 @@ void createAndGetChannel() ...@@ -97,18 +97,18 @@ void createAndGetChannel()
@Test @Test
void getChannels() void getChannels()
{ {
Channel channelOne = new Channel(); Channel channelOne = new Channel("test");
when(this.channelStore.create()).thenReturn(channelOne); when(this.channelStore.create()).thenReturn(channelOne);
EntityChannel entityChannelOne = EntityChannel entityChannelOne =
this.entityChannelStore.createChannel(entityReference, Arrays.asList("a", "b")); this.entityChannelStore.createChannel(entityReference, Arrays.asList("a", "b"));
when(this.channelStore.get(channelOne.getKey())).thenReturn(channelOne); when(this.channelStore.get(channelOne.getKey())).thenReturn(channelOne);
Channel channelTwo = new Channel(); Channel channelTwo = new Channel("test");
when(this.channelStore.create()).thenReturn(channelTwo); when(this.channelStore.create()).thenReturn(channelTwo);
EntityChannel entityChannelTwo = this.entityChannelStore.createChannel(entityReference, Arrays.asList("x")); EntityChannel entityChannelTwo = this.entityChannelStore.createChannel(entityReference, Arrays.asList("x"));
when(this.channelStore.get(channelTwo.getKey())).thenReturn(channelTwo); when(this.channelStore.get(channelTwo.getKey())).thenReturn(channelTwo);
Channel channelThree = new Channel(); Channel channelThree = new Channel("test");
when(this.channelStore.create()).thenReturn(channelThree); when(this.channelStore.create()).thenReturn(channelThree);
EntityChannel entityChannelThree = EntityChannel entityChannelThree =
this.entityChannelStore.createChannel(entityReference, Arrays.asList("a", "b", "c")); this.entityChannelStore.createChannel(entityReference, Arrays.asList("a", "b", "c"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment