Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of the <see cref="ThrowsException"/> class. Call this constructor
 /// when an exception of the wrong type was thrown.
 /// </summary>
 /// <param name="expectedType">The type of the exception that was expected</param>
 /// <param name="actual">The actual exception that was thrown</param>
 public ThrowsException(Type expectedType, Exception actual)
     : this(expectedType, ArgumentFormatter.Format(actual.GetType()), actual.Message, actual.StackTrace, actual)
 {
 }