Exemple #1
0
        public void Should_join_non_empty_if_last_invalid()
        {
            var result = StringExtensions.JoinNonEmpty("_", "1", "2", null);

            Assert.Equal("1_2", result);
        }
Exemple #2
0
        public void Should_join_non_empty_if_all_are_valid()
        {
            var result = StringExtensions.JoinNonEmpty("_", "1", "2", "3");

            Assert.Equal("1_2_3", result);
        }
Exemple #3
0
        public void Should_join_non_empty_if_middle_invalid()
        {
            var result = StringExtensions.JoinNonEmpty("_", "1", null, "3");

            Assert.Equal("1_3", result);
        }
Exemple #4
0
        public void Should_join_non_empty_when_first_invalid()
        {
            var result = StringExtensions.JoinNonEmpty("_", null, "2", "3");

            Assert.Equal("2_3", result);
        }