smrunner: dependency on ruby module removed
[fedora-idea.git] / platform / testFramework / src / com / intellij / testFramework / exceptionCases / AbstractExceptionCase.java
blob160d7cc60c959704fb611f05a8e95bd53b067661
1 package com.intellij.testFramework.exceptionCases;
3 /**
4 * @author Roman Chernyatchik
6 * Base class of block, annotated with exception. Inheritors of this
7 * class specifies concrete Exception classes
8 */
9 public abstract class AbstractExceptionCase<T extends Throwable> {
11 public abstract Class<T> getExpectedExceptionClass();
13 /**
14 * Suspicious code must be in implementation of this closure
15 * @throws T
17 public abstract void tryClosure() throws T;
19 public String getAssertionErrorMessage() {
20 return getExpectedExceptionClass().getName() + " must be thrown.";