Пример #1
0
 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);
     }
 }
Пример #2
0
 public InjectorException(InjectorError errorType, string message, Exception innerException) : base(message, innerException)
 {
     ErrorType = errorType;
 }
Пример #3
0
 public InjectorException(InjectorError errorType, string message) : base(message)
 {
     ErrorType = errorType;
 }