예제 #1
0
        public void TestString()
        {
            FilterParamIndexNotEquals index = new FilterParamIndexNotEquals(MakeLookupable("TheString"), lockFactory.ObtainNew());

            index.Put("hello", testEvaluator);
            index.Put("test", testEvaluator);

            VerifyString(index, null, 0);
            VerifyString(index, "dudu", 2);
            VerifyString(index, "hello", 1);
            VerifyString(index, "test", 1);
        }
예제 #2
0
        public void TestBoolean()
        {
            FilterParamIndexNotEquals index = new FilterParamIndexNotEquals(MakeLookupable("BoolPrimitive"), lockFactory.ObtainNew());

            Assert.AreEqual(FilterOperator.NOT_EQUAL, index.FilterOperator);
            Assert.AreEqual("BoolPrimitive", index.Lookupable.Expression);

            index.Put(false, testEvaluator);

            VerifyBooleanPrimitive(index, true, 1);
            VerifyBooleanPrimitive(index, false, 0);
        }