@@ -19,7 +19,6 @@ import org.junit.jupiter.api.Nested
19
19
import org.junit.jupiter.api.Test
20
20
import org.mockito.Mock
21
21
import org.mockito.MockitoAnnotations
22
- import org.phoenixframework.utilities.copyAndRemove
23
22
import java.net.URL
24
23
import java.util.concurrent.TimeUnit
25
24
@@ -756,8 +755,8 @@ class SocketTest {
756
755
val spy = spy(channel)
757
756
758
757
// Use the spy instance instead of the Channel instance
759
- socket.channels = socket.channels.copyAndRemove (channel)
760
- socket.channels = socket.channels.copyAndAdd (spy)
758
+ socket.channels = socket.channels.minus (channel)
759
+ socket.channels = socket.channels.plus (spy)
761
760
762
761
spy.join()
763
762
assertThat(spy.state).isEqualTo(Channel .State .JOINING )
@@ -772,8 +771,8 @@ class SocketTest {
772
771
val spy = spy(channel)
773
772
774
773
// Use the spy instance instead of the Channel instance
775
- socket.channels = socket.channels.copyAndRemove (channel)
776
- socket.channels = socket.channels.copyAndAdd (spy)
774
+ socket.channels = socket.channels.minus (channel)
775
+ socket.channels = socket.channels.plus (spy)
777
776
778
777
spy.join().trigger(" ok" , emptyMap())
779
778
@@ -789,8 +788,8 @@ class SocketTest {
789
788
val spy = spy(channel)
790
789
791
790
// Use the spy instance instead of the Channel instance
792
- socket.channels = socket.channels.copyAndRemove (channel)
793
- socket.channels = socket.channels.copyAndAdd (spy)
791
+ socket.channels = socket.channels.minus (channel)
792
+ socket.channels = socket.channels.plus (spy)
794
793
795
794
spy.join().trigger(" ok" , emptyMap())
796
795
spy.leave()
@@ -828,8 +827,8 @@ class SocketTest {
828
827
val spy = spy(channel)
829
828
830
829
// Use the spy instance instead of the Channel instance
831
- socket.channels = socket.channels.copyAndRemove (channel)
832
- socket.channels = socket.channels.copyAndAdd (spy)
830
+ socket.channels = socket.channels.minus (channel)
831
+ socket.channels = socket.channels.plus (spy)
833
832
834
833
spy.join()
835
834
assertThat(spy.state).isEqualTo(Channel .State .JOINING )
@@ -844,8 +843,8 @@ class SocketTest {
844
843
val spy = spy(channel)
845
844
846
845
// Use the spy instance instead of the Channel instance
847
- socket.channels = socket.channels.copyAndRemove (channel)
848
- socket.channels = socket.channels.copyAndAdd (spy)
846
+ socket.channels = socket.channels.minus (channel)
847
+ socket.channels = socket.channels.plus (spy)
849
848
850
849
spy.join().trigger(" ok" , emptyMap())
851
850
@@ -861,8 +860,8 @@ class SocketTest {
861
860
val spy = spy(channel)
862
861
863
862
// Use the spy instance instead of the Channel instance
864
- socket.channels = socket.channels.copyAndRemove (channel)
865
- socket.channels = socket.channels.copyAndAdd (spy)
863
+ socket.channels = socket.channels.minus (channel)
864
+ socket.channels = socket.channels.plus (spy)
866
865
867
866
spy.join().trigger(" ok" , emptyMap())
868
867
spy.leave()
@@ -886,8 +885,8 @@ class SocketTest {
886
885
val otherChannel = mock<Channel >()
887
886
whenever(otherChannel.isMember(any())).thenReturn(false )
888
887
889
- socket.channels = socket.channels.copyAndAdd (targetChannel)
890
- socket.channels = socket.channels.copyAndRemove (otherChannel)
888
+ socket.channels = socket.channels.plus (targetChannel)
889
+ socket.channels = socket.channels.minus (otherChannel)
891
890
892
891
val rawMessage =
893
892
" {\" topic\" :\" topic\" ,\" event\" :\" event\" ,\" payload\" :{\" one\" :\" two\" },\" status\" :\" ok\" }"
0 commit comments