コード例 #1
0
        public void ConvertToEvent_serializes_data_correctly(
            string id,
            MessageData1 data,
            TracingProperties tracingProperties,
            [Frozen] IJsonProcessor jsonProcessor,
            EventConverter sut)
        {
            var message = new Message(id, data, tracingProperties);

            EventData actual = sut.ConvertToEvent(message);

            string       body    = Encoding.UTF8.GetString(actual.Body.Array);
            MessageData1 content = jsonProcessor.FromJson <MessageData1>(body);

            content.Should().BeEquivalentTo(data);
        }