public void should_correctly_serialize_nulled_data_with_binary()
        {
            var model = SerializationTestHelper.GenerateNulledModel();

            var serializer = new BinarySerializer(_mappingRegistry);
            var output     = serializer.Serialize(model);

            _outputHelper.WriteLine("FileSize: " + output.AsBytes.Length + " bytes");
            _outputHelper.WriteLine(BitConverter.ToString(output.AsBytes));

            var deserializer = new BinaryDeserializer(_mappingRegistry, _typeCreator);
            var result       = deserializer.Deserialize <ComplexModel>(output);

            SerializationTestHelper.AssertNulledData(model, result);
        }
        public void should_correctly_serialize_nulled_data_into_existing_object_with_json()
        {
            var model      = SerializationTestHelper.GenerateNulledModel();
            var serializer = new JsonSerializer(_mappingRegistry);

            var output = serializer.Serialize(model);

            _outputHelper.WriteLine("FileSize: " + output.AsString.Length + " bytes");
            _outputHelper.WriteLine(output.AsString);

            var deserializer = new JsonDeserializer(_mappingRegistry, _typeCreator);
            var result       = new ComplexModel();

            deserializer.DeserializeInto(output, result);

            SerializationTestHelper.AssertNulledData(model, result);
        }