/// <summary>
 /// Initializes a new instance of the <see cref="ExceptionMessageTestBuilder"/> class.
 /// </summary>
 /// <param name="testContext"><see cref="ComponentTestContext"/> containing data about the currently executed assertion chain.</param>
 /// <param name="exceptionTestBuilder">Test builder of <see cref="IAndExceptionTestBuilder"/> type.</param>
 public ExceptionMessageTestBuilder(
     ComponentTestContext testContext,
     IAndExceptionTestBuilder exceptionTestBuilder)
     : base(testContext)
 {
     this.exceptionTestBuilder = exceptionTestBuilder;
     this.actualMessage = testContext.CaughtException.Message;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionMessageTestBuilder"/> class.
 /// </summary>
 /// <param name="testContext"><see cref="ComponentTestContext"/> containing data about the currently executed assertion chain.</param>
 /// <param name="exceptionTestBuilder">Test builder of <see cref="IAndExceptionTestBuilder"/> type.</param>
 public ExceptionMessageTestBuilder(
     ComponentTestContext testContext,
     IAndExceptionTestBuilder exceptionTestBuilder)
     : base(testContext)
 {
     this.exceptionTestBuilder = exceptionTestBuilder;
     this.actualMessage        = testContext.CaughtException.Message;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionMessageTestBuilder" /> class.
 /// </summary>
 /// <param name="controller">Controller on which the action will be tested.</param>
 /// <param name="actionName">Name of the tested action.</param>
 /// <param name="caughtException">Caught exception during the action execution.</param>
 /// <param name="exceptionTestBuilder">Original exception test builder.</param>
 public ExceptionMessageTestBuilder(
     ApiController controller,
     string actionName,
     Exception caughtException,
     IAndExceptionTestBuilder exceptionTestBuilder)
     : base(controller, actionName, caughtException)
 {
     this.exceptionTestBuilder = exceptionTestBuilder;
     this.actualMessage = caughtException.Message;
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionMessageTestBuilder" /> class.
 /// </summary>
 /// <param name="controller">Controller on which the action will be tested.</param>
 /// <param name="actionName">Name of the tested action.</param>
 /// <param name="caughtException">Caught exception during the action execution.</param>
 /// <param name="exceptionTestBuilder">Original exception test builder.</param>
 public ExceptionMessageTestBuilder(
     ApiController controller,
     string actionName,
     Exception caughtException,
     IAndExceptionTestBuilder exceptionTestBuilder)
     : base(controller, actionName, caughtException)
 {
     this.exceptionTestBuilder = exceptionTestBuilder;
     this.actualMessage        = caughtException.Message;
 }