public void BadDataDefinitionFixedLengthImportTest()
        {
            string path = @"c:\temp\BadDataDefinitionFixedLengthImportTest.csv";

            BuildSimpleFixedLengthFile(path, 100);
            var parser   = new SimpleFixedLengthParser(path);
            var response = parser.PerformImport <FixedBadTestData>();
        }
        public void SimpleFixedLengthImportTest()
        {
            string path = @"c:\temp\SimpleFixedLengthImportTest.csv";

            BuildSimpleFixedLengthFile(path, 100);
            var parser   = new SimpleFixedLengthParser(path);
            var response = parser.PerformImport <FixedTestData>();

            Assert.IsTrue(response.WasSuccessful);
            Assert.AreEqual(100, response.Data.Count());
            Assert.AreEqual("SomeData10", response.Data.Where(n => n.Number == 10).Single().Data.Trim());
        }
        public void SimpleFixedLengthWithHeaderAndFooterImportTest()
        {
            string path = @"c:\temp\SimpleFixedLengthWithHeaderAndFooterImportTest.csv";

            BuildFixedLengthFileWithHeaderAndFooter(path, 100);
            var parser   = new SimpleFixedLengthParser(path);
            var response = parser.PerformImport <FixedTestHeader, FixedTestData, FixedTestFooter>();

            Assert.IsTrue(response.WasSuccessful);
            Assert.AreEqual(100, response.Header.Count);
            Assert.AreEqual(100, response.Data.Count());
            Assert.AreEqual("SomeData10", response.Data.Where(n => n.Number == 10).Single().Data.Trim());
            Assert.AreEqual(4950, response.Footer.Checksum);
        }