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); }