public void FormattedErrorMessageToStringShowsMessageAndParameter() { Exception ex = new Exception("ex"); ExceptionErrorMessage lhs = new ExceptionErrorMessage(ex, "message"); Assert.AreEqual("Message \"message\" Exception \"ex\"", lhs.ToString()); }
public void SameMessageAndExceptionAreEqual() { Exception ex = new Exception("ex"); ExceptionErrorMessage lhs = new ExceptionErrorMessage(ex, "message"); ExceptionErrorMessage rhs = new ExceptionErrorMessage(ex, "message"); Assert.AreEqual(lhs, rhs); }
public void ShowExceptionErrorMethodSavesExceptionErrorMessageObject() { ApplicationException ex = new ApplicationException("Error"); ExceptionErrorMessage message = new ExceptionErrorMessage(ex, "message"); panel.ShowExceptionError(ex, "message"); Assert.AreEqual(message, panel.ExceptionErrorMessage); }
public void ErrorMessageDisplayedWhenExceptionThrownLoadingSchema() { ApplicationException ex = new ApplicationException("message"); fileSystem.ExceptionToThrowWhenCopyFileCalled = ex; schemasEditor.SaveOptions(); ExceptionErrorMessage message = new ExceptionErrorMessage(ex, "${res:ICSharpCode.XmlEditor.XmlSchemasPanel.UnableToSaveChanges}"); Assert.AreEqual(message, panel.ExceptionErrorMessage); }