Adding tests

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

Branch: refs/heads/ignite-2977
Commit: cda07484f85982f95c9d686ce51c6d9a5d917572
Parents: 8921d7f
Author: Pavel Tupitsyn <[email protected]>
Authored: Wed Apr 13 13:04:16 2016 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Wed Apr 13 13:04:16 2016 +0300

----------------------------------------------------------------------
 .../ignite/platform/PlatformCacheEntryEventFilter.java       | 8 ++++++++
 .../platform/PlatformCacheEntryEventFilterFactory.java       | 8 ++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cda07484/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
 
b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
index 37457b7..cc6bd9b 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
@@ -17,7 +17,9 @@
 
 package org.apache.ignite.platform;
 
+import org.apache.ignite.Ignite;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
+import org.apache.ignite.resources.IgniteInstanceResource;
 
 import javax.cache.event.CacheEntryEvent;
 import javax.cache.event.CacheEntryListenerException;
@@ -30,8 +32,14 @@ public class PlatformCacheEntryEventFilter implements 
CacheEntryEventSerializabl
     @SuppressWarnings("FieldCanBeLocal")
     private String startsWith = "-";
 
+    /** Injected instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
+
     /** {@inheritDoc} */
     @Override public boolean evaluate(CacheEntryEvent event) throws 
CacheEntryListenerException {
+        assert ignite != null;
+
         return ((String)event.getValue()).startsWith(startsWith);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cda07484/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilterFactory.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilterFactory.java
 
b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilterFactory.java
index 7f15734..5410603 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilterFactory.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilterFactory.java
@@ -17,7 +17,9 @@
 
 package org.apache.ignite.platform;
 
+import org.apache.ignite.Ignite;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
+import org.apache.ignite.resources.IgniteInstanceResource;
 
 import javax.cache.event.CacheEntryEvent;
 import javax.cache.event.CacheEntryListenerException;
@@ -32,8 +34,14 @@ public class PlatformCacheEntryEventFilterFactory implements 
Serializable,
     @SuppressWarnings("FieldCanBeLocal")
     private String startsWith = "-";
 
+    /** Injected instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
+
     /** {@inheritDoc} */
     @Override public CacheEntryEventSerializableFilter create() {
+        assert ignite != null;
+
         return new CacheEntryEventSerializableFilter() {
             @Override public boolean evaluate(CacheEntryEvent event) throws 
CacheEntryListenerException {
                 return ((String)event.getValue()).startsWith(startsWith);

Reply via email to