public void CsvToFixedLengthCommon() { CommonEngine.TransformFile <FromClass, ToClass>(FileTest.Good.Transform1.Path, fileOut); var engine = new FileHelperEngine <ToClass>(); ToClass[] res = engine.ReadFile(fileOut); if (File.Exists(fileOut)) { File.Delete(fileOut); } Assert.AreEqual(6, res.Length); }
public void CsvToFixedLengthCommon() { CommonEngine.TransformFile(Common.TestPath("Good\\Transform1.txt"), typeof(FromClass), Common.TestPath("Good\\transformout.txt"), typeof(ToClass)); FileHelperEngine engine = new FileHelperEngine(typeof(ToClass)); ToClass[] res = (ToClass[])engine.ReadFile(Common.TestPath("Good\\transformout.txt")); if (File.Exists(Common.TestPath("Good\\transformout.txt"))) { File.Delete(Common.TestPath("Good\\transformout.txt")); } Assert.AreEqual(6, res.Length); }