Inheritance: Encog.App.Analyst.CSV.Basic.BasicFile
        public void TestSortHeaders()
        {
            GenerateTestFileHeadings(true);
            var norm = new SortCSV();
            norm.SortOrder.Add(new SortedField(1, SortType.SortString, true));
            norm.Process(InputName, OutputName, true, CSVFormat.English);

            var tr = new StreamReader(OutputName.ToString());

            Assert.AreEqual("\"a\",\"b\"", tr.ReadLine());
            Assert.AreEqual("\"one\",1", tr.ReadLine());
            Assert.AreEqual("\"two\",2", tr.ReadLine());
            Assert.AreEqual("\"three\",3", tr.ReadLine());
            Assert.AreEqual("\"four\",4", tr.ReadLine());
            Assert.AreEqual("\"five\",5", tr.ReadLine());
            Assert.AreEqual("\"six\",6", tr.ReadLine());
            Assert.IsNull(tr.ReadLine());

            tr.Close();

            InputName.Delete();
            OutputName.Delete();
        }
Exemple #2
0
 /// <summary>
 ///     Construct the object.
 /// </summary>
 /// <param name="owner">The owner.</param>
 public RowComparator(SortCSV owner)
 {
     _sort = owner;
 }