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(); }
public bool MoveNext() { var res = mEngine.ReadNext(); if (res == null) { mEngine.Close(); return(false); } return(true); }
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()); }