Пример #1
0
        public void record_sent_message_with_id()
        {
            var message = new MyMessage
            {
                Id = Guid.NewGuid(),
                Name = "Jeremy"
            };

            var sent = MessageTrack.ForSent(message, "foo");

            sent.FullName.ShouldEqual(typeof(MyMessage).FullName);
            sent.Type.ShouldEqual(typeof(MyMessage).Name);
            sent.Description.ShouldEqual(message.ToString());
            sent.Id.ShouldEqual("foo");
            sent.Status.ShouldEqual(MessageTrack.Sent);
        }
Пример #2
0
        public void record_received_message_with_explicit_id()
        {
            var message = new MyMessage
            {
                Id = Guid.NewGuid(),
                Name = "Jeremy"
            };

            var sent = MessageTrack.ForReceived(message, "bar");

            sent.FullName.ShouldEqual(typeof(MyMessage).FullName);
            sent.Type.ShouldEqual(typeof(MyMessage).Name);
            sent.Description.ShouldEqual(message.ToString());
            sent.Id.ShouldEqual("bar");
            sent.Status.ShouldEqual(MessageTrack.Received);
        }