Ejemplo n.º 1
0
        public void GetColumnIndex_ColumnNotExist_NegativeIndex()
        {
            var dataColumn          = "Data Value";
            var dateTimeStampColumn = "Date/Time";

            var file      = GetTestingFileA();
            var processor = new MockingFileProcessor(dataColumn, dateTimeStampColumn);

            processor.SetDataAndPrepareProcessing(file);
            var index = processor.GetColumnIndex("Column not exists");

            var expected = -1;

            Assert.AreEqual(index, expected);
        }
Ejemplo n.º 2
0
        public void GetColumnIndex_ColumnExist_MatchResult()
        {
            var dataColumn          = "Data Value";
            var dateTimeStampColumn = "Date/Time";

            var file      = GetTestingFileA();
            var processor = new MockingFileProcessor(dataColumn, dateTimeStampColumn);

            processor.SetDataAndPrepareProcessing(file);
            var index = processor.GetColumnIndex(dataColumn);

            var expected = 5;

            Assert.AreEqual(index, expected);
        }