public void CanUseTheDefaultNamespace()
        {
            var ser = new YAXSerializer(typeof(YAXLibMetadataOverridingWithNamespace));

            ser.YaxLibNamespacePrefix = string.Empty;
            ser.YaxLibNamespaceUri = "http://namespace.org/sample";
            ser.DimensionsAttributeName = "dm";
            ser.RealTypeAttributeName = "type";

            var sampleInstance = YAXLibMetadataOverridingWithNamespace.GetSampleInstance();
            var result = ser.Serialize(sampleInstance);

            var expected =
                @"<YAXLibMetadataOverridingWithNamespace xmlns=""http://namespace.org/sample"">
  <IntArray dm=""2,3"">
    <Int32>1</Int32>
    <Int32>2</Int32>
    <Int32>3</Int32>
    <Int32>2</Int32>
    <Int32>3</Int32>
    <Int32>4</Int32>
  </IntArray>
  <Obj type=""System.String"">Hello, World!</Obj>
</YAXLibMetadataOverridingWithNamespace>";
            Assert.That(result, Is.EqualTo(expected));

            var desObj = (YAXLibMetadataOverridingWithNamespace) ser.Deserialize(expected);

            Assert.That(desObj.Obj.ToString(), Is.EqualTo(sampleInstance.Obj.ToString()));
            Assert.That(desObj.IntArray.Length, Is.EqualTo(sampleInstance.IntArray.Length));
        }
        public void CanSuppressMetadataButUseCustomNamespace()
        {
            var ser = new YAXSerializer(typeof(YAXLibMetadataOverridingWithNamespace),
                YAXSerializationOptions.SuppressMetadataAttributes);

            var sampleInstance = YAXLibMetadataOverridingWithNamespace.GetSampleInstance();
            var result = ser.Serialize(sampleInstance);

            var expected =
                @"<YAXLibMetadataOverridingWithNamespace xmlns=""http://namespace.org/sample"">
  <IntArray>
    <Int32>1</Int32>
    <Int32>2</Int32>
    <Int32>3</Int32>
    <Int32>2</Int32>
    <Int32>3</Int32>
    <Int32>4</Int32>
  </IntArray>
  <Obj>Hello, World!</Obj>
</YAXLibMetadataOverridingWithNamespace>";
            Assert.That(result, Is.EqualTo(expected));
        }