diff options
author | iain holmes <iain@xamarin.com> | 2015-07-01 16:12:46 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2015-07-01 16:12:46 +0300 |
commit | ef784d4742a9dc1afe949d9ffdfff8085f52fbc5 (patch) | |
tree | bd4dc92d16a20c6943a6ce94930160414347cc3e /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest | |
parent | 79e91dc42712226ec3a82d05115d67e701687401 (diff) |
[Test Framework] Remove the IsBuildSuccessful calls from AutoTestSession
IsBuildSuccessful is not right for being in AutoTestSession as it is an
interpretation of the data, which should be left up to the tests to decide. It
has been replaced with a method called ErrorCount which returns the number of
errors reported at a specified severity. It is then up to the caller to decide
what to do with this data.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestClientSession.cs | 6 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestClientSession.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestClientSession.cs index a256ffd56f..d8d656db72 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestClientSession.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestClientSession.cs @@ -34,6 +34,7 @@ using System.Collections.Generic; using System.Xml; using MonoDevelop.Core.Instrumentation; using MonoDevelop.Components.Commands; +using MonoDevelop.Ide.Tasks; namespace MonoDevelop.Components.AutoTest { @@ -199,10 +200,9 @@ namespace MonoDevelop.Components.AutoTest } */ - // FIXME: This shouldn't be here - public bool IsBuildSuccessful () + public int ErrorCount (TaskSeverity severity) { - return session.IsBuildSuccessful (); + return session.ErrorCount (severity); } public void WaitForEvent (string name) diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs index d4cd79f970..bb5642b6f6 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs @@ -216,9 +216,9 @@ namespace MonoDevelop.Components.AutoTest } // FIXME: This shouldn't be here. - public bool IsBuildSuccessful () + public int ErrorCount (TaskSeverity severity) { - return TaskService.Errors.Count (x => x.Severity == TaskSeverity.Error) == 0; + return TaskService.Errors.Count (x => x.Severity == severity); } object SafeObject (object ob) |