diff options
author | Keting Yang <ketyang@microsoft.com> | 2020-01-02 23:20:55 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2020-01-09 13:21:46 +0300 |
commit | 6fdb7502022e24e9107da3b65aece7b2ce759d66 (patch) | |
tree | 5725c94575337094f81a9055ea69c1260f27c90c /main/src/addins/MonoDevelop.UnitTesting.NUnit | |
parent | 1956267793d7d80fcb026493815f17512486d557 (diff) |
Fix typos, simplify cast, add property
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting.NUnit')
2 files changed, 16 insertions, 9 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitAssemblyTestSuite.cs b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitAssemblyTestSuite.cs index fe39d2d12b..a1aed30e25 100644 --- a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitAssemblyTestSuite.cs +++ b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitAssemblyTestSuite.cs @@ -281,12 +281,12 @@ namespace MonoDevelop.UnitTesting.NUnit var forceLoad = newTest.Tests; while (queue.Count != 0) { NUnitTestSuite unhandledList = queue.Dequeue (); - foreach (NUnitTestSuite unhandeledTest in unhandledList.UnhandledTests) { - Tests.Add (unhandeledTest); + foreach (NUnitTestSuite unhandledTest in unhandledList.UnhandledTests) { + Tests.Add (unhandledTest); } - foreach (UnitTest unhandeledTest in unhandledList.Tests) { - if (unhandeledTest is NUnitTestSuite) { - queue.Enqueue ((NUnitTestSuite)unhandeledTest); + foreach (UnitTest unhandledTest in unhandledList.Tests) { + if (unhandledTest is NUnitTestSuite) { + queue.Enqueue ((NUnitTestSuite)unhandledTest); } } } diff --git a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitTestSuite.cs b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitTestSuite.cs index d48bd0922a..781143dfcf 100644 --- a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitTestSuite.cs +++ b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitTestSuite.cs @@ -37,7 +37,7 @@ namespace MonoDevelop.UnitTesting.NUnit NUnitAssemblyTestSuite rootSuite; string fullName; - public UnitTestCollection UnhandledTests; + UnitTestCollection unhandledTests; public NUnitTestSuite (NUnitAssemblyTestSuite rootSuite, NunitTestInfo tinfo): base (tinfo.Name) { @@ -48,7 +48,7 @@ namespace MonoDevelop.UnitTesting.NUnit this.canMergeWithParent = !string.IsNullOrEmpty (tinfo.PathName) && string.IsNullOrEmpty (tinfo.FixtureTypeName) && string.IsNullOrEmpty (tinfo.FixtureTypeNamespace); - this.UnhandledTests = new UnitTestCollection (); + this.unhandledTests = new UnitTestCollection (); } bool canMergeWithParent; @@ -63,6 +63,12 @@ namespace MonoDevelop.UnitTesting.NUnit return true; } } + + public override UnitTestCollection UnhandledTests { + get { + return unhandledTests; + } + } public string ClassName { get { return fullName; } @@ -104,8 +110,9 @@ namespace MonoDevelop.UnitTesting.NUnit } if (isNameSpace) { - ((NUnitTestSuite)newTest).testInfo.Name = ((NUnitTestSuite)newTest).testInfo.TestId; - UnhandledTests.Add (newTest); + var newNamespaceTestSuite = (NUnitTestSuite)newTest; + newNamespaceTestSuite.testInfo.Name = newNamespaceTestSuite.testInfo.TestId; + unhandledTests.Add (newNamespaceTestSuite); } else { Tests.Add (newTest); } |