diff options
author | Keting Yang <ketyang@microsoft.com> | 2019-12-04 00:17:02 +0300 |
---|---|---|
committer | Keting Yang <ketyang@microsoft.com> | 2019-12-04 00:17:02 +0300 |
commit | 1d3a221dea09d051a03571c310a37a7c68c59895 (patch) | |
tree | f95ef85b55fc2a1a8a5c065e9fb728c1ed759a34 /main/src/addins/MonoDevelop.UnitTesting | |
parent | 5cf6a6d193abdd6d9031c99a10650bcae32b5eb2 (diff) |
Change the nesting logic
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestNamespaceTestGroup.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestNamespaceTestGroup.cs b/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestNamespaceTestGroup.cs index 1f0fe79440..c53c8f8efc 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestNamespaceTestGroup.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.VsTest/VsTestNamespaceTestGroup.cs @@ -66,16 +66,16 @@ namespace MonoDevelop.UnitTesting.VsTest { string childNamespace = VsTestTest.FixtureTypeNamespace; - if(currentNamespace.Name != childNamespace) { + if(currentNamespace == null || currentNamespace.Name != childNamespace) { currentNamespace = new VsTestNamespaceTestGroup (testRunner, currentNamespace, Project, childNamespace); currentNamespace.AddTest (VsTestTest); Tests.Add (currentNamespace); } else { - if (currentClass == null || currentClass.FixtureTypeName != VsTestTest.FixtureTypeName) { + if(currentNamespace.currentClass == null || currentNamespace.currentClass.FixtureTypeName != VsTestTest.FixtureTypeName) { currentClass = new VsTestTestClass (testRunner, Project, VsTestTest); - Tests.Add (currentClass); + currentNamespace.Tests.Add (currentClass); } - currentClass.Tests.Add (VsTestTest); + currentNamespace.currentClass.Tests.Add (VsTestTest); } } |