protected void ExpectError(Action closure, InjectorError errorType, params object[] args) { try { closure(); Assert.Fail("Exception expected."); } catch (InjectorException ex) { Assert.AreSame(errorType, ex.ErrorType); Assert.AreEqual(errorType.FormatEx(args).Message, ex.Message); } }
public InjectorException(InjectorError errorType, string message, Exception innerException) : base(message, innerException) { ErrorType = errorType; }
public InjectorException(InjectorError errorType, string message) : base(message) { ErrorType = errorType; }