public void GetWhereCondition_EmptyViewMode_EmptyWhereCondition()
        {
            var filter = new CoffeeFilterViewModel();

            filter.Load();

            var where = filter.GetWhereCondition();

            CMSAssert.All(
                () => Assert.IsNotNull(where),
                () => Assert.IsEmpty(where.ToString(true))
                );
        }
        public void GetWhereCondition_SetUpDecaf_RestrictionInWhereCondition()
        {
            var filter = new CoffeeFilterViewModel
            {
                OnlyDecaf = true
            };

            filter.Load();

            var where = filter.GetWhereCondition();

            CMSAssert.All(
                () => Assert.IsNotNull(where),
                () => Assert.AreEqual("[CoffeeIsDecaf] = 1", where.ToString(true))
                );
        }
        public void GetWhereCondition_SetUpCoffeeProcessingType_RestrictionInWhereCondition()
        {
            var filter = new CoffeeFilterViewModel();

            filter.Load();

            filter.ProcessingTypes[0].IsChecked = true;
            filter.ProcessingTypes[1].IsChecked = false;
            filter.ProcessingTypes[2].IsChecked = true;

            var where = filter.GetWhereCondition();

            CMSAssert.All(
                () => Assert.IsNotNull(where),
                () => Assert.AreEqual("[CoffeeProcessing] IN (N'Washed', N'Natural')", where.ToString(true))
                );
        }