public void Can_alter_Message_after_deformatting()
        {
            var f = new TestExtenededMessageFormatter(new Utf8MessageSerializer(null), new JsonMessageStringifier(null));

            var a = f.Deformat(f.Format(new MyTestMessage() { Set = "DDD" }));

            ((MyTestMessage)a).Altered.Should().Be("AAA");
        }
        public void Can_alter_Message_before_formatting()
        {
            var f = new TestExtenededMessageFormatter(new Utf8MessageSerializer(null), new JsonMessageStringifier(null));

            var bytes = f.Format(new MyTestMessage() {Set = "DDD"});

            var obj = new JsonMessageStringifier(null).Destringify(Encoding.UTF8.GetString(bytes));

            ((MyTestMessage) obj).Altered.Should().Be("AAA");
        }
        public void Formats_and_Deformats()
        {
            var f = new TestExtenededMessageFormatter(new Utf8MessageSerializer(null), new JsonMessageStringifier(null));

            var a = f.Deformat(f.Format(new MyTestMessage() {Set = "DDD"}));

            ((MyTestMessage) a).Set.Should().Be("DDD");
        }