Esempio n. 1
0
        public void WhenSelectorReturnsTypeThatIsNotInEngine_ShouldThrowBadUsageException_WhenReadingRecordAtATime()
        {
            engine = new MultiRecordEngine(new RecordTypeSelector(CustomSelectorReturningBadType),
                                           typeof(OrdersVerticalBar), typeof(CustomersSemiColon), typeof(SampleType));

            engine.BeginReadFile(FileTest.Good.MultiRecord1.Path);

            Assert.Throws <BadUsageException>(() => engine.ReadNext());
        }
 private void ProcessButton_Click(object sender, EventArgs e)
 {
     textBox1.Clear();
     while (engine.ReadNext() != null)
     {
         mainFunc.Call(engine, engine.LastRecord);
     }
     myConsole.realFlush();
 }
Esempio n. 3
0
            public bool MoveNext()
            {
                var res = mEngine.ReadNext();

                if (res == null)
                {
                    mEngine.Close();
                    return(false);
                }

                return(true);
            }
Esempio n. 4
0
        public void WhenSelectorReturnsTypeThatIsNotInEngine_ShouldThrowBadUsageException_WhenReadingRecordAtATime()
        {
            engine = new MultiRecordEngine(new RecordTypeSelector(CustomSelectorReturningBadType),
                                           typeof(OrdersVerticalBar), typeof(CustomersSemiColon), typeof(SampleType));

            engine.BeginReadFile(FileTest.Good.MultiRecord1.Path);

            Assert.Throws<BadUsageException>(() => engine.ReadNext());
        }