Exemplo n.º 1
0
        public void StringBuilder_Append_String_Should_Be_True_And_Have_One_ElementAdded(string str)
        {
            var stringBuilder = new StringBuilder();

            var flag = stringBuilder.AddIfNotNullEmptyWhitespace(str);

            Assert.True(flag);

            Assert.NotEqual(0, stringBuilder.Length);
        }
Exemplo n.º 2
0
        public void StringBuilder_Append_NullString_EmptyString_WhiteSpaceString_Should_Be_False_And_Not_Added(string str)
        {
            var stringBuilder = new StringBuilder();

            var flag = stringBuilder.AddIfNotNullEmptyWhitespace(str);

            Assert.False(flag);

            Assert.Equal(0, stringBuilder.Length);
        }