public void Constructor_CopiesErrorCode() { var result = new WebDriverError(WebDriverErrorCode.InvalidArgument); Assert.Same(WebDriverErrorCode.InvalidArgument, result.ErrorCode); Assert.Equal("The arguments passed to a command are either invalid or malformed.", result.Message); Assert.Equal("invalid argument", result.Error); Assert.Null(result.Data); Assert.Null(result.StackTrace); }
/// <summary> /// Initializes a new instance of the <see cref="WebDriverExceptionData"/> class with a /// specified error code, an error message and a reference to the inner exception that is the cause /// of this exception. /// </summary> /// <param name="errorCode"> /// The web driver error code. /// </param> /// <param name="message"> /// The message that describes the error. /// </param> /// <param name="inner"> /// The exception that is the cause of the current exception, or /// <see langword="null"/> if no inner exception is specified. /// </param> public WebDriverException(WebDriverError errorCode, string message, Exception inner) : base(message, inner) { this.ErrorCode = errorCode; }