diff --git a/src/test/java/net/cryptic_game/microservice/chat/channel/ChannelTests.java b/src/test/java/net/cryptic_game/microservice/chat/channel/ChannelTests.java index d3632ea..4beaa12 100644 --- a/src/test/java/net/cryptic_game/microservice/chat/channel/ChannelTests.java +++ b/src/test/java/net/cryptic_game/microservice/chat/channel/ChannelTests.java @@ -35,10 +35,17 @@ public void testAddUser() { final Channel channel = new Channel("test"); final User testUser = new User(UUID.randomUUID(), "test", "test@test.test", new Date(), new Date()); - assertTrue(channel.addUser(testUser)); assertTrue(channel.getUsers().contains(testUser)); } + @Test + public void testAddUserReturn() { + final Channel channel = new Channel("test"); + final User testUser = new User(UUID.randomUUID(), "test", "test@test.test", new Date(), new Date()); + + assertTrue(channel.addUser(testUser)); + } + @Test public void testDupedAddUser() { final Channel channel = new Channel("test"); @@ -57,10 +64,22 @@ public void testRemoveUser() { fail(); } - assertTrue(channel.removeUser(testUser)); assertFalse(channel.getUsers().contains(testUser)); } + @Test + public void testRemoveUserReturn() { + final Channel channel = new Channel("test"); + final User testUser = new User(UUID.randomUUID(), "test", "test@test.test", new Date(), new Date()); + channel.addUser(testUser); + + if (!channel.getUsers().contains(testUser)) { + fail(); + } + + assertTrue(channel.removeUser(testUser)); + } + @Test public void testRemoveUserWithoutExist() { final Channel channel = new Channel("test");