Esempio n. 1
0
        public void SupportsNullableDateTime()
        {
            var    mapper = new AttributesMappingManager();
            var    ser    = new SolrDocumentSerializer <TestDocWithNullableDate>(mapper, new DefaultFieldSerializer());
            var    doc    = new TestDocWithNullableDate();
            string fs     = ser.Serialize(doc, null).ToString(SaveOptions.DisableFormatting);

            Assert.Equal("<doc />", fs);
        }
Esempio n. 2
0
        public void SupportsNullableDateTime()
        {
            var    mapper = new AttributesMappingManager();
            var    ser    = new SolrDocumentSerializer <TestDocWithNullableDate>(mapper, new DefaultFieldSerializer());
            var    doc    = new TestDocWithNullableDate();
            string fs     = ser.Serialize(doc, null).OuterXml;
            var    xml    = new XmlDocument();

            xml.LoadXml(fs);
            Console.WriteLine(fs);
            Assert.AreEqual("<doc />", fs);
        }
 public void SupportsNullableDateTime() {
     var mapper = new AttributesMappingManager();
     var ser = new SolrDocumentSerializer<TestDocWithNullableDate>(mapper, new DefaultFieldSerializer());
     var doc = new TestDocWithNullableDate();
     string fs = ser.Serialize(doc, null).ToString(SaveOptions.DisableFormatting);
     Assert.AreEqual("<doc />", fs);
 }
 public void SupportsNullableDateTime()
 {
     var mapper = new AttributesMappingManager();
     var ser = new SolrDocumentSerializer<TestDocWithNullableDate>(mapper, new DefaultFieldSerializer());
     var doc = new TestDocWithNullableDate();
     string fs = ser.Serialize(doc, null).OuterXml;
     var xml = new XmlDocument();
     xml.LoadXml(fs);
     Console.WriteLine(fs);
     Assert.AreEqual("<doc />", fs);
 }