You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2021/03/16 07:29:55 UTC
[ignite] 01/02: IGNITE-14320 Fix invocation .Net -> .Net services
with system types arguments.
This is an automated email from the ASF dual-hosted git repository.
nizhikov pushed a commit to branch IGNITE-14320-2
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 0c6417473677ac6e569dedaffdf37c383e0c880c
Author: Nikolay Izhikov <ni...@apache.org>
AuthorDate: Tue Mar 16 10:26:44 2021 +0300
IGNITE-14320 Fix invocation .Net -> .Net services with system types arguments.
---
.../Services/ServicesTypeAutoResolveTest.cs | 25 +++++++---------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs
index 2d666ab..f3a7c7c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs
@@ -18,7 +18,6 @@
namespace Apache.Ignite.Core.Tests.Services
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -141,8 +140,6 @@ namespace Apache.Ignite.Core.Tests.Services
DoTestService(svc);
- DoTestDepartments(svc);
-
_grid1.GetServices().Cancel(javaSvcName);
}
@@ -160,32 +157,26 @@ namespace Apache.Ignite.Core.Tests.Services
DoTestService(svc);
- DoTestDepartments(svc);
-
_grid1.GetServices().Cancel(javaSvcName);
}
/// <summary>
- /// Tests departments call.
+ /// Tests java service instance.
/// </summary>
- private void DoTestDepartments(IJavaService svc)
+ private static void DoTestService(IJavaService svc)
{
Assert.IsNull(svc.testDepartments(null));
- var arr = new[] {"HR", "IT"}.Select(x => new Department() {Name = x}).ToArray();
-
- ICollection deps = svc.testDepartments(arr);
+ var deps = svc.testDepartments(new[]
+ {
+ new Department() {Name = "HR"},
+ new Department() {Name = "IT"}
+ }.ToList());
Assert.NotNull(deps);
Assert.AreEqual(1, deps.Count);
- Assert.AreEqual("Executive", deps.OfType<Department>().Select(d => d.Name).ToArray()[0]);
- }
+ Assert.AreEqual("Executive", deps.OfType<Department>().ToArray()[0].Name);
- /// <summary>
- /// Tests java service instance.
- /// </summary>
- private static void DoTestService(IJavaService svc)
- {
Assert.IsNull(svc.testAddress(null));
Address addr = svc.testAddress(new Address {Zip = "000", Addr = "Moscow"});