public void NotExistsValue()
        {
            //arrange
            var filter = new InvalidCaseFilter {
                NotExistsValue = "WrongEnumName"
            };

            //act

            //asssert
            Assert.ThrowsAny <Exception>(() => InvalidCasesTestsData.Items.AutoFilter(filter));
        }
        public void NotExistsProperty()
        {
            //arrange
            var filter = new InvalidCaseFilter {
                NotExistsProperty = "First"
            };

            //act

            //asssert
            Assert.ThrowsAny <Exception>(() => InvalidCasesTestsData.Items.AutoFilter(filter));
        }
Exemple #3
0
        public void NotExistsProperty()
        {
            //arrange
            var filter = new InvalidCaseFilter {
                NotExistsProperty = "First"
            };

            //act
            var result = InvalidCasesTestsData.Items.AutoFilter(filter).ToList();

            //assert
            Assert.Equal(InvalidCasesTestsData.Items.Count, result.Count);
        }
Exemple #4
0
        public void NotExistsProperty()
        {
            //arrange
            Init();
            var filter = new InvalidCaseFilter {
                NotExistsProperty = "First"
            };

            //act

            //asssert
            Assert.ThrowsAny <Exception>(() => Context.InvalidCaseItems.AutoFilter(filter).ToList());
        }
Exemple #5
0
        public void NotExistsValue()
        {
            //arrange
            Init();
            var filter = new InvalidCaseFilter {
                NotExistsValue = "WrongEnumName"
            };

            //act

            //asssert
            Assert.ThrowsAny <Exception>(() => Context.InvalidCaseItems.AutoFilter(filter).ToList());
        }
        public void WithTargetType()
        {
            //arrange
            var filter = new InvalidCaseFilter {
                EnumTargetType = "Default"
            };

            //act
            var filtered = InvalidCasesTestsData.Items.AutoFilter(filter).ToList();

            //asssert
            Assert.Equal(1, filtered.Count);
            Assert.Equal(TargetEnum.Default, filtered[0].TargetEnum);
        }
Exemple #7
0
        public void NotExistsProperty()
        {
            //arrange
            Init();
            var filter = new InvalidCaseFilter {
                NotExistsProperty = "First"
            };

            //act
            var result = Context.InvalidCaseItems.AutoFilter(filter).ToList();

            //asssert
            Assert.Equal(result.Count, Context.InvalidCaseItems.Count());
        }