Пример #1
0
        public void CanCompareLessEqualThanWithSameNumbers_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Today
            };

            _memoryCompareDateTime.MeetsCondition(inMem, GetQueryParameter("DateTimeValue", DateTime.Today, Comparisons.LessEqualThan)).ShouldBeTrue();
        }
Пример #2
0
        public void CannotHandleString()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Now
            };

            _memoryCompareDateTime.CanHandle(inMem, GetQueryParameter("DateTimeValue", "1", Comparisons.Equal)).ShouldBeFalse();
        }
        public void CanCompareContains_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "foo1456bar"
            };

            _memoryCompareString.MeetsCondition(inMem, GetQueryParameter("StrValue", "456", Comparisons.StringContains)).ShouldBeTrue();
        }
        public void CanCompareNotEquals_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "foo14bar"
            };

            _memoryCompareString.MeetsCondition(inMem, GetQueryParameter("StrValue", "foo14bar2", Comparisons.NotEqual)).ShouldBeTrue();
        }
        public void CanCompareLessEqualThanWithSameNumbers_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 1284
            };

            _memoryCompareInt.MeetsCondition(inMem, GetQueryParameter("IntValue", 1284, Comparisons.LessEqualThan)).ShouldBeTrue();
        }
        public void CanCompareEndsWith_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "156bar"
            };

            _memoryCompareString.MeetsCondition(inMem, GetQueryParameter("StrValue", "bar", Comparisons.StringEndsWith)).ShouldBeTrue();
        }
        public void CannotHandleDate()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "1"
            };

            _memoryCompareString.CanHandle(inMem, GetQueryParameter("StrValue", DateTime.Now, Comparisons.Equal)).ShouldBeFalse();
        }
Пример #8
0
        public void CanCompareNotEquals_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Today.AddDays(-1), StrValue = "321"
            };

            _memoryCompareDateTime.MeetsCondition(inMem, GetQueryParameter("DateTimeValue", DateTime.Today, Comparisons.NotEqual)).ShouldBeTrue();
        }
        public void CanCompareNotEquals_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 6321, StrValue = "321"
            };

            _memoryCompareInt.MeetsCondition(inMem, GetQueryParameter("IntValue", 5321, Comparisons.NotEqual)).ShouldBeTrue();
        }
        public void CanCompareGreaterThan_MeetsConditionIsFalse()
        {
            var inMem = new InMemItem {
                IntValue = 122
            };

            _memoryCompareInt.MeetsCondition(inMem, GetQueryParameter("IntValue", 123, Comparisons.GreaterThan)).ShouldBeFalse();
        }
        public void CanCompareEqual_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 111
            };

            _memoryCompareInt.MeetsCondition(inMem, GetQueryParameter("IntValue", 111, Comparisons.Equal)).ShouldBeTrue();
        }
        public void CanHandleInt()
        {
            var inMem = new InMemItem {
                IntValue = 145
            };

            _memoryCompareInt.CanHandle(inMem, GetQueryParameter("IntValue", 145, Comparisons.Equal)).ShouldBeTrue();
        }
        public void CanCompareLessThan_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                IntValue = 123
            };

            _memoryCompareInt.MeetsCondition(inMem, GetQueryParameter("IntValue", 124, Comparisons.LessThan)).ShouldBeTrue();
        }
Пример #14
0
        public void CanHandleDate()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Now
            };

            _memoryCompareDateTime.CanHandle(inMem, GetQueryParameter("DateTimeValue", DateTime.Now, Comparisons.Equal)).ShouldBeTrue();
        }
        public void CanHandleString()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "1"
            };

            _memoryCompareString.CanHandle(inMem, GetQueryParameter("StrValue", "foobar", Comparisons.Equal)).ShouldBeTrue();
        }
Пример #16
0
        public void CanCompareEqual_MeetsConditionIsTrue()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Today
            };

            _memoryCompareDateTime.MeetsCondition(inMem, GetQueryParameter("DateTimeValue", DateTime.Today, Comparisons.Equal)).ShouldBeTrue();
        }
        public void CanCompareEqual_MeetsConditionIsFalse()
        {
            var inMem = new InMemItem {
                IntValue = 1, StrValue = "321"
            };

            _memoryCompareString.MeetsCondition(inMem, GetQueryParameter("StrValue", "156", Comparisons.Equal)).ShouldBeFalse();
        }
Пример #18
0
        public void CanCompareGreaterThan_MeetsConditionIsFalse()
        {
            var inMem = new InMemItem {
                DateTimeValue = DateTime.Today.AddDays(-1)
            };

            _memoryCompareDateTime.MeetsCondition(inMem, GetQueryParameter("DateTimeValue", DateTime.Today, Comparisons.GreaterThan)).ShouldBeFalse();
        }
        public void CannotHandleString()
        {
            var inMem = new InMemItem {
                IntValue = 1
            };

            _memoryCompareInt.CanHandle(inMem, GetQueryParameter("IntValue", "1", Comparisons.Equal)).ShouldBeFalse();
        }