1 package com
.intellij
.testFramework
.exceptionCases
;
4 * @author Roman Chernyatchik
6 * Base class of block, annotated with exception. Inheritors of this
7 * class specifies concrete Exception classes
9 public abstract class AbstractExceptionCase
<T
extends Throwable
> {
11 public abstract Class
<T
> getExpectedExceptionClass();
14 * Suspicious code must be in implementation of this closure
17 public abstract void tryClosure() throws T
;
19 public String
getAssertionErrorMessage() {
20 return getExpectedExceptionClass().getName() + " must be thrown.";