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); }
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); }
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); }