You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/04/13 16:53:21 UTC
[22/50] ignite git commit: Adding tests
Adding tests
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bd5b5957
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bd5b5957
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bd5b5957
Branch: refs/heads/ignite-2977
Commit: bd5b59579f9de0b1e553e5fe45bd723186063b5c
Parents: 22acef6
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Wed Apr 13 12:59:02 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Wed Apr 13 12:59:02 2016 +0300
----------------------------------------------------------------------
.../Continuous/ContinuousQueryJavaFilterTest.cs | 31 ++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/bd5b5957/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 5b6439a..1122ca5 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
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
using System.Linq;
using Apache.Ignite.Core.Cache.Event;
using Apache.Ignite.Core.Cache.Query.Continuous;
- using Apache.Ignite.Core.Common;
using Apache.Ignite.Core.Interop;
using NUnit.Framework;
@@ -95,6 +94,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
[Test]
public void TestFilter()
{
+ // TODO: Test all kinds of properties
var javaObj = new JavaObject("org.apache.ignite.platform.PlatformCacheEntryEventFilter")
{
Properties = {{"startsWith", "valid"}}
@@ -106,7 +106,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
}
/// <summary>
- /// Tests the filter.
+ /// Tests the factory class.
/// </summary>
[Test]
public void TestFactory()
@@ -120,6 +120,33 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
}
/// <summary>
+ /// Tests the invalid class name
+ /// </summary>
+ [Test]
+ public void TestInvalidClassName()
+ {
+ var filter = new JavaObject("blabla").ToCacheEntryEventFilter<int, string>();
+
+ TestFilter(filter);
+ }
+
+ /// <summary>
+ /// Tests the invalid class name
+ /// </summary>
+ [Test]
+ public void TestInvalidProperty()
+ {
+ var javaObject = new JavaObject("org.apache.ignite.platform.PlatformCacheEntryEventFilter")
+ {
+ Properties = {{"invalidProp", "123"}}
+ };
+
+ var filter = javaObject.ToCacheEntryEventFilter<int, string>();
+
+ TestFilter(filter);
+ }
+
+ /// <summary>
/// Tests the specified filter.
/// </summary>
private void TestFilter(ICacheEntryEventFilter<int, string> pred)