コード例 #1
0
        public void WriteNullTest()
        {
            var converter = new XmlNullableConverter();
            var actual    = converter.ToXml <int?>(null);
            var expected  = "<xml />";

            Assert.That(actual, IsXml.Equals(expected));
        }
コード例 #2
0
        public void WriteNullableAttributeTest()
        {
            var converter = new XmlNullableConverter();
            var actual    = converter.ToXml <int?>(1, member: GetAttributeMember <int?>());
            var expected  = "<xml value=\"1\" />";

            Assert.That(actual, IsXml.Equals(expected));
        }