Exemplo n.º 1
0
        public void AddFilter_ShouldThrowErrorIfAddingSameFilter()
        {
            //arrange
            var filterState = new FilterState();

            //act
            filterState.AddFilter("priority", 1, FilterOperator.EqualTo);

            //assert
            Assert.NotNull(filterState.Filter.Filters[0]);
            Assert.Throws <InvalidOperationException>(() => filterState.AddFilter("priority", 1, FilterOperator.EqualTo));
        }
Exemplo n.º 2
0
        public void AddFilter_Test()
        {
            //arrange
            var filterState = new FilterState();

            //act
            filterState.AddFilter("priority", 1, FilterOperator.EqualTo);

            //assert
            Assert.NotNull(filterState.Filter.Filters[0]);
        }