public void Some_CSV(string csv, string expected) { var sut = new CSVtoASCIITableFormatter(); Console.WriteLine("---CSV input:\n{0}", csv); var table = sut.Format(csv); Assert.AreEqual(expected, table); Console.WriteLine("\n---Table output:\n{0}", table); }
public void Mock_col_width_calculation(string csv, string expected) { var tbopsMock = Mock.Create<TableFormatterOperations>(); Mock.Arrange(() => tbopsMock.Calculate_column_widths(null)) .IgnoreArguments() .IgnoreInstance() .Returns(new[] {2, 3, 4}); var sut = new CSVtoASCIITableFormatter(); var table = sut.Format(csv); Assert.AreEqual(expected, table); }