Ejemplo n.º 1
0
 public SettingsXml()
 {
     Defaults           = new List <DefaultXml>();
     References         = new List <ReferenceXml>();
     ParallelizeQueries = true;
     CsvProfile         = new CsvProfileXml
                          (
         GetDefaultValue <string>(x => x.InternalFieldSeparator)[0]
         , GetDefaultValue <string>(x => x.InternalRecordSeparator)
                          );
 }
Ejemplo n.º 2
0
        public void Serialize_CrLfForRecordSeparator_RecordSeparatorNotSpecified()
        {
            var profile = new CsvProfileXml();
            profile.FieldSeparator = '#';
            profile.RecordSeparator = "\r\n";

            var manager = new XmlManager();
            var xml = manager.XmlSerializeFrom<CsvProfileXml>(profile);

            Assert.That(xml, Is.Not.StringContaining("record-separator"));
        }
Ejemplo n.º 3
0
        public void Serialize_SemiColumnForFieldSeparator_FieldSeparatorNotSpecified()
        {
            var profile = new CsvProfileXml();
            profile.FieldSeparator = ';';
            profile.RecordSeparator = "#";

            var manager = new XmlManager();
            var xml = manager.XmlSerializeFrom<CsvProfileXml>(profile);

            Assert.That(xml, Is.Not.StringContaining("field-separator"));
        }
Ejemplo n.º 4
0
        public void Serialize_CardinalForFieldSeparator_FieldSeparatorSpecified()
        {
            var profile = new CsvProfileXml();
            profile.FieldSeparator = '#';
            profile.RecordSeparator = "\r";

            var manager = new XmlManager();
            var xml = manager.XmlSerializeFrom<CsvProfileXml>(profile);

            Assert.That(xml, Is.StringContaining("field-separator"));
            Assert.That(xml, Is.StringContaining("#"));

            Assert.That(xml, Is.StringContaining("record-separator"));
            Assert.That(xml, Is.StringContaining("Cr"));
        }