コード例 #1
0
            public void Requests_Null_Message()
            {
                var messenger = Substitute.For <IBinaryMessenger>();
                var channel   = new BasicMessageChannel <string>(TEST_CHANNEL_NAME, new StringCodec(), messenger);

                channel.Send(null);

                messenger.Received().Send(Arg.Is <string>(x => x == TEST_CHANNEL_NAME), null);
            }
コード例 #2
0
            public void Requests_Correct_Message()
            {
                var messenger = Substitute.For <IBinaryMessenger>();
                var channel   = new BasicMessageChannel <string>(TEST_CHANNEL_NAME, new StringCodec(), messenger);

                channel.Send(StringCodecTests.TEST_STRING);

                messenger.Received().Send(Arg.Is <string>(x => x == TEST_CHANNEL_NAME),
                                          Arg.Is <byte[]>(x => x.SequenceEqual(StringCodecTests.TEST_BYTES)));
            }
コード例 #3
0
 public override void OnPostResume()
 {
     _lifecycleMessages.Send("AppLifecycleState.resumed");
 }