public void should_serialize_populated_nullable_data_with_debug_serializer()
        {
            var model      = SerializationTestHelper.GeneratePopulatedNullableModel();
            var serializer = new DebugSerializer(_mappingRegistry);

            var output = serializer.Serialize(model);

            _outputHelper.WriteLine(output.AsString);
        }
        public void should_correctly_serialize_populated_nullable_data_with_binary()
        {
            var model = SerializationTestHelper.GeneratePopulatedNullableModel();

            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 <NullableTypesModel>(output);

            SerializationTestHelper.AssertNullableModelData(model, result);
        }
        public void should_correctly_serialize_populated_nullable_data_into_existing_object_with_json()
        {
            var model      = SerializationTestHelper.GeneratePopulatedNullableModel();
            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 NullableTypesModel();

            deserializer.DeserializeInto(output, result);

            SerializationTestHelper.AssertNullableModelData(model, result);
        }