public FixedLengthErrorHandlingTests() { layout = A.Fake <IFixedLengthLayoutDescriptor>(); A.CallTo(() => layout.TargetType).Returns(typeof(Record)); A.CallTo(() => layout.InstanceFactory).Returns(() => new Record()); lineParserFactory = A.Fake <IFixedLengthLineParserFactory>(); A.CallTo(() => lineParserFactory.GetParser(A <IFixedLengthLayoutDescriptor> .Ignored)) .Returns(new FakeLineParser()); }
/// <summary> /// Gets a line parser for a record type. /// </summary> /// <param name="layoutDescriptor">The layout descriptor.</param> /// <returns>The line parser.</returns> protected override ILineParser GetLineParser(IFixedLengthLayoutDescriptor layoutDescriptor) => _lineParserFactory.GetParser(layoutDescriptor);