diff options
author | Dmytro Ovcharov <dmytro.ovcharov@globallogic.com> | 2017-11-27 15:27:58 +0300 |
---|---|---|
committer | Dmytro Ovcharov <dmytro.ovcharov@globallogic.com> | 2017-11-27 15:27:58 +0300 |
commit | 785ae9c178636e625c4399bcea9c0c7d2404479d (patch) | |
tree | 2553a480d3f8cde0a7098c4536cd7beb01aec5df /main/src/addins/MonoDevelop.UnitTesting.NUnit | |
parent | b990e078c2f76f939986a204c9bfd64fe6b89883 (diff) |
CheckXmlForError fixed
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting.NUnit')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs b/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs index 3aae642231..3726e36337 100644 --- a/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs +++ b/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs @@ -151,11 +151,12 @@ namespace NUnit3Runner { var elements = root.GetElementsByTagName ("properties"); var skipReasonString = string.Empty; - foreach (XmlElement element in elements) - //Reason why i parse InnerXml - GetAttribute returns empty strings - if (element.InnerXml.Contains ("name=\"_SKIPREASON\"")) - skipReasonString = (Regex.Match (element.InnerXml, "value=\"(.+?)\"") - .ToString ().Substring (6).Trim ('\"')); + foreach (XmlElement element in elements) { + var nestedElement = element.FirstChild as XmlElement; + if (nestedElement != null) + if ("_SKIPREASON" == nestedElement.GetAttribute ("name")) + skipReasonString = nestedElement.GetAttribute ("value"); + } result = skipReasonString; return !string.IsNullOrEmpty (skipReasonString); } |