public void Serialize_TypeMappings_Empty_IsSingleClosedElement()
        {
            var xml = SerializationHelper.CleanSerialize(new TypeMappings(), "TypeMappings");

            Assert.AreEqual("<TypeMappings />", xml);
            Console.WriteLine(xml);
        }
        public void Serialize_TypeMappings_HasDefaultType_IsSingleClosedElementWithDefaultTypeAttr()
        {
            var xml = SerializationHelper.CleanSerialize(new TypeMappings {
                DefaultType = "x"
            }, "TypeMappings");

            Assert.AreEqual(@"<TypeMappings DefaultType=""x"" />", xml);
            Console.WriteLine(xml);
        }
        public void Serialize_TypeMappings_WritesItems()
        {
            var xml = SerializationHelper.CleanSerialize(new TypeMappings(new[] { new TypeMapping("a", "b"), new TypeMapping("c", "d") }), "TypeMappings");

            Assert.AreEqual(
                @"<TypeMappings>
  <TypeMapping DataTypeId=""a"" Type=""b"" />
  <TypeMapping DataTypeId=""c"" Type=""d"" />
</TypeMappings>", xml);
        }