示例#1
0
        public FixedWidthFileWriterTests()
        {
            var logic = new PrimitiveTypeExpectations();

            rows   = logic.GetExpectedRows();
            layout = logic.GetLayout();
        }
        public FixedWidthFileWriter(IFlatFileLayoutDescriptor <T> layout, string filePath)
        {
            this.layout   = layout;
            this.filePath = filePath;

            if (layout.GetOrderedFields()
                .Any(x => x.TypeConverter == null))
            {
                throw new ArgumentException("Missing TypeConverter for one or more fields", nameof(layout));
            }
        }
示例#3
0
 public DummyFixedWidthFileParser(IFlatFileLayoutDescriptor <TEntity> layout)
 {
     this.layout = layout;
 }
示例#4
0
        private void WriteTestFile(ICollection <PrimitiveTypesModel> rows, IFlatFileLayoutDescriptor <PrimitiveTypesModel> layout)
        {
            var writer = new FixedWidthFileWriter <PrimitiveTypesModel>(layout, GetOutputFilePath());

            writer.WriteFile(rows);
        }
示例#5
0
 public ExpressionTests()
 {
     settings = GetTestLayoutDescriptor();
 }