/// <summary> /// Raises the test error event /// </summary> /// <param name="commandException"></param> /// <returns><c>true</c> if the error should be re-thrown;otherwise <c>false</c></returns> private bool OnSucessOccured(CommandException commandException) { this.Errors.Add(commandException); this.ErrorOccurred(this, new TestErrorEventArgs(new TestError(commandException, this))); return true; }
/// <summary> /// Raises the test error event /// </summary> /// <param name="commandException"></param> /// <returns><c>true</c> if the error should be re-thrown;otherwise <c>false</c></returns> private bool OnErrorOccured(CommandException commandException) { this.numberOfFailedCommands = this.numberOfFailedCommands + 1; if (!this.ThrowErrors) { this.Errors.Add(commandException); if (this.ErrorOccurred != null) { if (this.evidenceImagePath != "") this.ErrorOccurred(this, new TestErrorEventArgs(new TestError(commandException, this, this.evidenceImagePath))); else this.ErrorOccurred(this, new TestErrorEventArgs(new TestError(commandException, this))); } return false; } return true; }
/// <summary> /// Initializes a new instance of the <see cref="TestError"/> class. /// </summary> /// <param name="exception">The exception.</param> /// <param name="test">The test.</param> public TestError(CommandException exception, Test test,bool passou) { this.exception = exception; this.test = test; this.Passou = passou; }
/// <summary> /// Initializes a new instance of the <see cref="TestError"/> class. /// </summary> /// <param name="exception">The exception.</param> /// <param name="test">The test.</param> /// <param name="evidenceImagePath">The path of the screenshot toke when the failure has happend</param> public TestError(CommandException exception, Test test, string evidenceImagePath) { this.exception = exception; this.test = test; this.evidenceImagePath = evidenceImagePath; }
/// <summary> /// Initializes a new instance of the <see cref="TestError"/> class. /// </summary> /// <param name="exception">The exception.</param> /// <param name="test">The test.</param> public TestError(CommandException exception, Test test) { this.exception = exception; this.test = test; }