public void TestJoinerToStringGivesExpectedString(string seperator, string expected) { var joiner = new StringJoiner(seperator); joiner.Append("a"); joiner.Append("b"); joiner.Append("c"); Assert.AreEqual(expected, joiner.ToString()); }
public void TestJoinerClearClearsString() { var joiner = new StringJoiner(""); joiner.Append("a"); joiner.Clear(); Assert.AreEqual(string.Empty, joiner.ToString()); }
public void TestJoinerDoesntThrowsOnAppendIfDefaultCtor() { var joiner = new StringJoiner(); Assert.DoesNotThrow(() => joiner.Append("a")); }