ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [14/50] ignite git commit: wip
Date Wed, 13 Apr 2016 14:53:13 GMT
wip


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3bdfcd05
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3bdfcd05
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3bdfcd05

Branch: refs/heads/ignite-2977
Commit: 3bdfcd052355dbf3f2636ddbdf5aba9a3bc290ed
Parents: ed277e4
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Tue Apr 12 18:22:07 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Committed: Tue Apr 12 18:22:07 2016 +0300

----------------------------------------------------------------------
 .../Continuous/ContinuousQueryJavaFilterTest.cs | 29 ++++++++++++++++----
 1 file changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3bdfcd05/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
index 7d9033d..9febfa90 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
@@ -19,7 +19,6 @@
 namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
 {
     using System.Collections.Generic;
-    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using Apache.Ignite.Core.Cache.Event;
     using Apache.Ignite.Core.Cache.Query.Continuous;
@@ -90,17 +89,37 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         }
 
         /// <summary>
-        /// Tests the java objects.
+        /// Tests the filter.
         /// </summary>
         [Test]
         public void TestFilter()
         {
-            var cache = _ignite.GetOrCreateCache<int, string>("qry");
-
-            var pred = JavaObjectFactory.CreateCacheEntryEventFilter<int, string>(
+            var filter = JavaObjectFactory.CreateCacheEntryEventFilter<int, string>(
                 "org.apache.ignite.platform.PlatformCacheEntryEventFilter",
                 new Dictionary<string, object> {{"startsWith", "valid"}});
 
+            TestFilter(filter);
+        }
+
+        /// <summary>
+        /// Tests the filter.
+        /// </summary>
+        [Test]
+        public void TestFactory()
+        {
+            var filter = JavaObjectFactory.CreateCacheEntryEventFilterFactory<int, string>(
+                "org.apache.ignite.platform.PlatformCacheEntryEventFilterFactory",
+                new Dictionary<string, object> {{"startsWith", "valid"}});
+
+            TestFilter(filter);
+        }
+
+        /// <summary>
+        /// Tests the specified filter.
+        /// </summary>
+        private void TestFilter(ICacheEntryEventFilter<int, string> pred)
+        {
+            var cache = _ignite.GetOrCreateCache<int, string>("qry");
             var qry = new ContinuousQuery<int, string>(new QueryListener(), pred);
 
             using (cache.QueryContinuous(qry))


Mime
View raw message