From ca47896204482bf4a6979e3838bf7f09f61cebeb Mon Sep 17 00:00:00 2001 From: giy <giy@omp-system.ru> Date: Fri, 02 Sep 2022 14:16:56 +0300 Subject: [PATCH] Обновление до версии 2.9.0 --- Tests/Test_QtMsBuild.Tasks/Test_Join.cs | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Tests/Test_QtMsBuild.Tasks/Test_Join.cs b/Tests/Test_QtMsBuild.Tasks/Test_Join.cs index 0ae7973..3743125 100644 --- a/Tests/Test_QtMsBuild.Tasks/Test_Join.cs +++ b/Tests/Test_QtMsBuild.Tasks/Test_Join.cs @@ -26,19 +26,20 @@ ** ****************************************************************************/ -using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Linq; using System.Collections.Generic; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; -using QtVsTools.QtMsBuild.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace QtVsTools.Test.QtMsBuild.Tasks { + using QtVsTools.QtMsBuild.Tasks; + [TestClass] public class Test_Join { - ITaskItem[] LeftItems = new TaskItem[] + readonly ITaskItem[] LeftItems = new TaskItem[] { new TaskItem("A", new Dictionary<string, string> { { "X", "foo" }, @@ -53,8 +54,7 @@ { "Y", "3.14159" }, }), }; - - ITaskItem[] RightItems = new TaskItem[] + readonly ITaskItem[] RightItems = new TaskItem[] { new TaskItem("A", new Dictionary<string, string> { { "Z", "foo" }, @@ -90,9 +90,8 @@ // --------------- var criteria = new string[] { "Y" }; - ITaskItem[] result; Assert.IsTrue( - Join.Execute(LeftItems, RightItems, out result, criteria)); + Join.Execute(LeftItems, RightItems, out ITaskItem[] result, criteria)); Assert.IsTrue(result != null && result.Length == 3); Assert.IsTrue(result[0].GetMetadata("X") == "foo"); @@ -124,9 +123,8 @@ // ------------------- var criteria = new string[] { "ROW_NUMBER" }; - ITaskItem[] result; Assert.IsTrue( - Join.Execute(LeftItems, RightItems, out result, criteria)); + Join.Execute(LeftItems, RightItems, out ITaskItem[] result, criteria)); Assert.IsTrue(result != null && result.Length == 3); Assert.IsTrue(result[0].GetMetadata("X") == "foo"); @@ -158,9 +156,8 @@ // ------------------- var criteria = new string[] { "ROW_NUMBER", "Y" }; - ITaskItem[] result; Assert.IsTrue( - Join.Execute(LeftItems, RightItems, out result, criteria)); + Join.Execute(LeftItems, RightItems, out ITaskItem[] result, criteria)); Assert.IsTrue(result != null && result.Length == 0); } @@ -187,9 +184,8 @@ .ToArray(); var criteria = new string[] { "ROW_NUMBER", "Y" }; - ITaskItem[] result; Assert.IsTrue( - Join.Execute(newLeftItems, RightItems, out result, criteria)); + Join.Execute(newLeftItems, RightItems, out ITaskItem[] result, criteria)); Assert.IsTrue(result != null && result.Length == 1); Assert.IsTrue(result[0].GetMetadata("X") == "zzz"); @@ -212,9 +208,8 @@ // --------------------- A | bar | 99 B | bar | 99 | bar // --------------------- ---------------------- - ITaskItem[] result; Assert.IsTrue( - Join.Execute(LeftItems, RightItems, out result)); + Join.Execute(LeftItems, RightItems, out ITaskItem[] result)); Assert.IsTrue(result != null && result.Length == 4); Assert.IsTrue(result[0].GetMetadata("X") == "foo"); -- Gitblit v1.9.1