예제 #1
0
        public void AddNewFilterToFilterString_appends_new_filter()
        {
            // When
            var result = FilteringHelper.AddNewFilterToFilterString("Test", "Filter");

            // Then
            result.Should().Be("Test╡Filter");
        }
예제 #2
0
        public void AddNewFilterToFilterString_returns_new_filter_if_existingFilterString_is_null()
        {
            // When
            var result = FilteringHelper.AddNewFilterToFilterString(null, "Test");

            // Then
            result.Should().Be("Test");
        }
예제 #3
0
        public void AddNewFilterToFilterString_doesnt_append_with_null_new_filter()
        {
            // When
            var result = FilteringHelper.AddNewFilterToFilterString("Test", null);

            // Then
            result.Should().Be("Test");
        }
예제 #4
0
        public void AddNewFilterToFilterString_appends_new_filter_even_if_substring(
            string filterString,
            string newFilterToAdd
            )
        {
            // When
            var result = FilteringHelper.AddNewFilterToFilterString(filterString, newFilterToAdd);

            // Then
            result.Should().Be($"{filterString}╡{newFilterToAdd}");
        }
예제 #5
0
        public void AddNewFilterToFilterString_doesnt_append_with_new_filter_already_in_filterString(
            string filterString,
            string newFilterToAdd
            )
        {
            // When
            var result = FilteringHelper.AddNewFilterToFilterString(filterString, newFilterToAdd);

            // Then
            result.Should().Be(filterString);
        }