Пример #1
0
        public void TestMethod2()
        {
            var res = Filtr.Go(new List <Filter>
            {
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Farg,
                    Value        = "blå"
                },
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Storlek,
                    Value        = "S"
                },
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Farg,
                    Value        = "grön"
                },
                new Filter
                {
                    Execute      = false,
                    PropertyType = PropertyType.Marke,
                    Value        = "Addidas"
                }
            });

            Assert.AreEqual(3, res.Count);
        }
Пример #2
0
        public void TestMethod4()
        {
            var res = Filtr.Go(new List <Filter>
            {
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Doft,
                    Value        = "citron"
                }
            });

            Assert.AreEqual(1, res.Count);
        }
Пример #3
0
        public void TestMethod5()
        {
            var res = Filtr.Go(new List <Filter>
            {
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Marke,
                    Value        = "Addidas"
                },
                new Filter
                {
                    Execute      = true,
                    PropertyType = PropertyType.Storlek,
                    Value        = "XL"
                }
            });

            Assert.AreEqual(2, res.Count);
        }