Exemple #1
0
        public void MustOnlySupportXmlFormat()
        {
            var values = Enum.GetValues(typeof(FormatType));

            foreach (var value in values)
            {
                if (value is FormatType format && format != FormatType.Xml)
                {
                    Assert.IsFalse(sut.CanSerialize(format));
                }
            }

            Assert.IsTrue(sut.CanSerialize(FormatType.Xml));
        }
 public override bool CanWriteType(Type type)
 {
     return(serializer.CanSerialize(type));
 }