Beispiel #1
0
        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());
        }
Beispiel #2
0
        public void TestJoinerClearClearsString()
        {
            var joiner = new StringJoiner("");

            joiner.Append("a");
            joiner.Clear();
            Assert.AreEqual(string.Empty, joiner.ToString());
        }
Beispiel #3
0
        public void TestJoinerDoesntThrowsOnAppendIfDefaultCtor()
        {
            var joiner = new StringJoiner();

            Assert.DoesNotThrow(() => joiner.Append("a"));
        }