AddFilter() public method

Adds a filter expression.
public AddFilter ( string filter ) : void
filter string Filter expression.
return void
        public void AddFilterTwice()
        {
            // Arrange
            var result = new TranslationResult();
            const string filter = "name eq '123'";

            // Act
            result.AddFilter(filter);
            result.AddFilter(filter);

            // Assert
            Assert.NotNull(result.TableQuery);
            Assert.Equal(string.Format("{0} and {0}", filter), result.TableQuery.FilterString);
        }
        public void AddFiltersWithComplexAndComplexExpression()
        {
            // Arrange
            var result = new TranslationResult();
            const string filter = "name eq '123' or name eq '222'";

            // Act
            result.AddFilter(filter);
            result.AddFilter(filter);

            // Assert
            Assert.NotNull(result.TableQuery);
            Assert.Equal(string.Format("({0}) and ({1})", filter, filter), result.TableQuery.FilterString);
        }
        public void AddFiltersWithSimpleAndComplexExpression()
        {
            // Arrange
            var result = new TranslationResult();
            const string simple = "name eq '333'";
            const string complex = "name eq '123' or name eq '222'";

            // Act
            result.AddFilter(simple);
            result.AddFilter(complex);

            // Assert
            Assert.NotNull(result.TableQuery);
            Assert.Equal(string.Format("{0} and ({1})", simple, complex), result.TableQuery.FilterString);
        }
        public void AddFilter()
        {
            // Arrange
            var result = new TranslationResult();
            const string filter = "name eq '123'";

            // Act
            result.AddFilter(filter);

            // Assert
            Assert.NotNull(result.TableQuery);
            Assert.Equal(filter, result.TableQuery.FilterString);
        }
        public void AddNullFilter()
        {
            // Arrange
            var result = new TranslationResult();

            // Act && Assert
            Assert.Throws<ArgumentNullException>(() => result.AddFilter(null));
        }