diff options
author | Dmytro Ovcharov <dmytro.ovcharov@globallogic.com> | 2017-11-20 12:20:33 +0300 |
---|---|---|
committer | Dmytro Ovcharov <dmytro.ovcharov@globallogic.com> | 2017-11-20 12:20:33 +0300 |
commit | d40ba5fec794edbe14ccf58c1e177944cd2a6fe9 (patch) | |
tree | b46d0e64b3eb2b571e89af17ab2c28c4c0eb0677 /main/src/addins/MonoDevelop.UnitTesting.NUnit | |
parent | 078ca687c7ce42ed86ce47bd742f2dc61060816a (diff) |
Implemented referenced assemblies loading error in the unit test tree.
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting.NUnit')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitProjectTestSuite.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitProjectTestSuite.cs b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitProjectTestSuite.cs index 92f49b88b9..83197433f7 100644 --- a/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitProjectTestSuite.cs +++ b/main/src/addins/MonoDevelop.UnitTesting.NUnit/MonoDevelop.UnitTesting.NUnit/NUnitProjectTestSuite.cs @@ -44,6 +44,7 @@ using MonoDevelop.Ide.Gui.Components; using MonoDevelop.Core.Assemblies; using MonoDevelop.Core; using MonoDevelop.PackageManagement; +using System.Text; namespace MonoDevelop.UnitTesting.NUnit { @@ -68,6 +69,16 @@ namespace MonoDevelop.UnitTesting.NUnit this.project = project; project.NameChanged += OnProjectRenamed; IdeApp.ProjectOperations.EndBuild += OnProjectBuilt; + CheckReferencesErrors (); + } + + void CheckReferencesErrors() + { + var errorReferenceCollection = project.References.Where (reference => !string.IsNullOrEmpty (reference.ValidationErrorMessage)) + .ToList (); + var stringBuilder = new StringBuilder (); + errorReferenceCollection.ForEach (reference => stringBuilder.AppendLine($"{reference.Reference}:{reference.ValidationErrorMessage}")); + ReferenceErrorMessage += stringBuilder.ToString (); } protected override async Task OnBuild () |