public void WhenDataIsNotNullThenShouldSerializeWithExpectedValue()
        {
            var serializer = new JsonCommandSerializer();

            var result = serializer.Serialize(new FakeCommand());

            result.Should().BeEquivalentTo(_json);
        }
        public void WillSerializeCommands()
        {
            var command = new DoSomethingCommand
                {
                    Name = "Test",
                    NumberOfTimes = 1
                };

            var builder = new StringWriter();
            var sut = new JsonCommandSerializer(builder);

            sut.Inspect(command);

            Console.WriteLine(builder);
        }
Example #3
0
        public void WillSerializeCommands()
        {
            var command = new DoSomethingCommand
            {
                Name          = "Test",
                NumberOfTimes = 1
            };


            var builder = new StringWriter();
            var sut     = new JsonCommandSerializer(builder);

            sut.Inspect(command);

            Console.WriteLine(builder);
        }