Beispiel #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)
                          );
 }
Beispiel #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"));
        }
Beispiel #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"));
        }
Beispiel #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"));
        }