public void FirstTest() { Assert.AreEqual( "Your job\n" + "is to\n" + "write a\n" + "function\n" + "that takes\n" + "a string\n" + "and a\n" + "maximum\n," + "number", WordWrap.Warp("Your job is to write a function that takes a string and a maximum number", 10)); }
public void WrapTest_WhenStringhasSpaceAnywhereDoppelSpace() { string wrapped = WordWrap.Wrap("Hallo Ha Hallo", 6); Assert.AreEqual("Hallo\nHa \n Hallo", wrapped); }
public void WrapTest_full() { string wrapped = WordWrap.Wrap("Diesist ein zufälliger Te", 6); Assert.AreEqual("Diesis\nt ein\nzufäll\niger\nTe", wrapped); }
public void WrapTest_WhenStringhasSpace() { string wrapped = WordWrap.Wrap("Hallo Hallo Hallo", 5); Assert.AreEqual("Hallo\nHallo\nHallo", wrapped); }
public void WrapTest_WhenStringmorthen3Lines() { string wrapped = WordWrap.Wrap("HalloHalloHallo", 5); Assert.AreEqual("Hallo\nHallo\nHallo", wrapped); }
public void WrapTest_WhenStringToLong() { string wrapped = WordWrap.Wrap("HalloPat", 5); Assert.AreEqual("Hallo\nPat", wrapped); }
public void WrapTest_WhenSimpleString() { string wrapped = WordWrap.Wrap("Hallo zusammen", 14); Assert.AreEqual("Hallo zusammen", wrapped); }
public void WrapTest_WhenNull_ThenEmpty() { string wrapped = WordWrap.Wrap(null, 10); Assert.AreEqual("", wrapped); }