Actress.Tests.MailboxProcessorTests.Receive_PostAndReply C# (CSharp) Method

Receive_PostAndReply() private method

private Receive_PostAndReply ( ) : void
return void
        public void Receive_PostAndReply()
        {
            // Given
            var mb = MailboxProcessor.Start<IReplyChannel<int?>>(async inbox =>
            {
                var msg = await inbox.Receive();
                msg.Reply(100);
            });

            // When
            var result = mb.PostAndReply<int?>(channel => channel);

            Assert.Equal(100, result);
        }