public void TryTextFixedWriter06() { using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 5, 5 } })) { w.WriteRow(new string[] { "zu", "viele", "Rows" }); } Assert.AreEqual("zu viele\r\n", sw.ToString()); } }
public void TryTextFixedWriter05() { using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 12, 5 } })) { w.WriteRow(new string[] { "zuwenig Rows" }); } Assert.AreEqual("zuwenig Rows \r\n", sw.ToString()); } }
public void TryTextFixedWriter04() { using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 5, 5 } })) { w.WriteRow(new string[] { "Wert1", "Wert2" }); } Assert.AreEqual("Wert1Wert2\r\n", sw.ToString()); } }
public void TryTextFixedWriter03() { using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 12 } })) { w.WriteRow(new string[] { "genaue Länge" }); } Assert.AreEqual("genaue Länge\r\n", sw.ToString()); } }
public void TryTextFixedWriter02() { using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 8 } })) { w.WriteRow(new string[] { "Der Text ist zu lang" }); } Assert.AreEqual("Der Text\r\n", sw.ToString()); } }
public void TryTextFixedWriter07() { // HeaderRow > StartRow using (var sw = new StringWriter()) { using (var w = new TextFixedWriter(sw, new TextFixedSettings() { Lengths = new int[] { 5 }, HeaderRow = 2, StartRow = 1 })) { w.WriteRow(new string[] { "hi" }); } Assert.AreEqual("hi \r\n", sw.ToString()); } }