Пример #1
0
		public void SupportsBoolTrue() {
            var mapper = new AttributesMappingManager();
            var ser = new SolrDocumentSerializer<TestDocWithBool>(mapper, new DefaultFieldSerializer());
			var doc = new TestDocWithBool {B = true};
            string fs = ser.Serialize(doc, null).ToString(SaveOptions.DisableFormatting);
			Assert.AreEqual("<doc><field name=\"B\">true</field></doc>", fs);
		}
Пример #2
0
        public void SupportsBoolFalse()
        {
            var mapper = new AttributesMappingManager();
            var ser    = new SolrDocumentSerializer <TestDocWithBool>(mapper, new DefaultFieldSerializer());
            var doc    = new TestDocWithBool {
                B = false
            };
            string fs = ser.Serialize(doc, null).ToString(SaveOptions.DisableFormatting);

            Assert.Equal("<doc><field name=\"B\">false</field></doc>", fs);
        }
Пример #3
0
        public void SupportsBoolFalse()
        {
            var mapper = new AttributesMappingManager();
            var ser    = new SolrDocumentSerializer <TestDocWithBool>(mapper, new DefaultFieldSerializer());
            var doc    = new TestDocWithBool {
                B = false
            };
            string fs  = ser.Serialize(doc, null).OuterXml;
            var    xml = new XmlDocument();

            xml.LoadXml(fs);
            Assert.AreEqual("<doc><field name=\"B\">false</field></doc>", fs);
        }
 public void SupportsBoolFalse()
 {
     var mapper = new AttributesMappingManager();
     var ser = new SolrDocumentSerializer<TestDocWithBool>(mapper, new DefaultFieldSerializer());
     var doc = new TestDocWithBool {B = false};
     string fs = ser.Serialize(doc, null).OuterXml;
     var xml = new XmlDocument();
     xml.LoadXml(fs);
     Assert.AreEqual("<doc><field name=\"B\">false</field></doc>", fs);
 }