Пример #1
0
 public void ReadSimpleItems()
 {
     CSVFileReaderTestWrapper reader = new CSVFileReaderTestWrapper("CSVFileReaderSimpleTestInput.csv");
     Assert.AreEqual(1, reader.Fields.Count);
     Dictionary<string, string> fields = reader.Fields[0];
     Assert.AreEqual("Item 1", fields["Heading1"]);
     Assert.AreEqual("Item 2", fields["Heading2"]);
     Assert.AreEqual("Item 3", fields["Heading with space"]);
 }
Пример #2
0
 public void ReadHeadings()
 {
     CSVFileReaderTestWrapper reader = new CSVFileReaderTestWrapper("CSVFileReaderSimpleTestInput.csv");
     Assert.AreEqual(1, reader.Fields.Count);
     Dictionary<string, string> fields = reader.Fields[0];
     Assert.IsTrue(fields.ContainsKey("Heading1"));
     Assert.IsTrue(fields.ContainsKey("Heading2"));
     Assert.IsTrue(fields.ContainsKey("Heading with space"));
 }
Пример #3
0
        public void ReadSimpleItems()
        {
            CSVFileReaderTestWrapper reader = new CSVFileReaderTestWrapper("CSVFileReaderSimpleTestInput.csv");

            Assert.AreEqual(1, reader.Fields.Count);
            Dictionary <string, string> fields = reader.Fields[0];

            Assert.AreEqual("Item 1", fields["Heading1"]);
            Assert.AreEqual("Item 2", fields["Heading2"]);
            Assert.AreEqual("Item 3", fields["Heading with space"]);
        }
Пример #4
0
        public void ReadHeadings()
        {
            CSVFileReaderTestWrapper reader = new CSVFileReaderTestWrapper("CSVFileReaderSimpleTestInput.csv");

            Assert.AreEqual(1, reader.Fields.Count);
            Dictionary <string, string> fields = reader.Fields[0];

            Assert.IsTrue(fields.ContainsKey("Heading1"));
            Assert.IsTrue(fields.ContainsKey("Heading2"));
            Assert.IsTrue(fields.ContainsKey("Heading with space"));
        }