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); }
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))); }
public override void OnPostResume() { _lifecycleMessages.Send("AppLifecycleState.resumed"); }