public class org.junit.rules.ExpectedException extends java.lang.Object implements org.junit.rules.TestRule
{
private final org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder;
private java.lang.String missingExceptionMessage;
public static org.junit.rules.ExpectedException none()
{
org.junit.rules.ExpectedException v;
v = new org.junit.rules.ExpectedException;
specialinvoke v.<org.junit.rules.ExpectedException: void <init>()>();
return v;
}
private void <init>()
{
org.junit.rules.ExpectedException v;
org.junit.rules.ExpectedExceptionMatcherBuilder v;
v := @this: org.junit.rules.ExpectedException;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new org.junit.rules.ExpectedExceptionMatcherBuilder;
specialinvoke v.<org.junit.rules.ExpectedExceptionMatcherBuilder: void <init>()>();
v.<org.junit.rules.ExpectedException: org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder> = v;
v.<org.junit.rules.ExpectedException: java.lang.String missingExceptionMessage> = "Expected test to throw %s";
return;
}
public org.junit.rules.ExpectedException handleAssertionErrors()
{
org.junit.rules.ExpectedException v;
v := @this: org.junit.rules.ExpectedException;
return v;
}
public org.junit.rules.ExpectedException handleAssumptionViolatedExceptions()
{
org.junit.rules.ExpectedException v;
v := @this: org.junit.rules.ExpectedException;
return v;
}
public org.junit.rules.ExpectedException reportMissingExceptionWithMessage(java.lang.String)
{
java.lang.String v;
org.junit.rules.ExpectedException v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: java.lang.String;
v.<org.junit.rules.ExpectedException: java.lang.String missingExceptionMessage> = v;
return v;
}
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description)
{
org.junit.runners.model.Statement v;
org.junit.runner.Description v;
org.junit.rules.ExpectedException v;
org.junit.rules.ExpectedException$ExpectedExceptionStatement v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: org.junit.runners.model.Statement;
v := @parameter: org.junit.runner.Description;
v = new org.junit.rules.ExpectedException$ExpectedExceptionStatement;
specialinvoke v.<org.junit.rules.ExpectedException$ExpectedExceptionStatement: void <init>(org.junit.rules.ExpectedException,org.junit.runners.model.Statement)>(v, v);
return v;
}
public void expect(org.hamcrest.Matcher)
{
org.junit.rules.ExpectedException v;
org.junit.rules.ExpectedExceptionMatcherBuilder v;
org.hamcrest.Matcher v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: org.hamcrest.Matcher;
v = v.<org.junit.rules.ExpectedException: org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder>;
virtualinvoke v.<org.junit.rules.ExpectedExceptionMatcherBuilder: void add(org.hamcrest.Matcher)>(v);
return;
}
public void expect(java.lang.Class)
{
java.lang.Class v;
org.junit.rules.ExpectedException v;
org.hamcrest.Matcher v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: java.lang.Class;
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher instanceOf(java.lang.Class)>(v);
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(org.hamcrest.Matcher)>(v);
return;
}
public void expectMessage(java.lang.String)
{
java.lang.String v;
org.junit.rules.ExpectedException v;
org.hamcrest.Matcher v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: java.lang.String;
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher containsString(java.lang.String)>(v);
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(org.hamcrest.Matcher)>(v);
return;
}
public void expectMessage(org.hamcrest.Matcher)
{
org.junit.rules.ExpectedException v;
org.hamcrest.Matcher v, v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: org.hamcrest.Matcher;
v = staticinvoke <org.junit.internal.matchers.ThrowableMessageMatcher: org.hamcrest.Matcher hasMessage(org.hamcrest.Matcher)>(v);
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(org.hamcrest.Matcher)>(v);
return;
}
public void expectCause(org.hamcrest.Matcher)
{
org.junit.rules.ExpectedException v;
org.hamcrest.Matcher v, v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: org.hamcrest.Matcher;
v = staticinvoke <org.junit.internal.matchers.ThrowableCauseMatcher: org.hamcrest.Matcher hasCause(org.hamcrest.Matcher)>(v);
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(org.hamcrest.Matcher)>(v);
return;
}
public final boolean isAnyExceptionExpected()
{
org.junit.rules.ExpectedException v;
org.junit.rules.ExpectedExceptionMatcherBuilder v;
boolean v;
v := @this: org.junit.rules.ExpectedException;
v = v.<org.junit.rules.ExpectedException: org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder>;
v = virtualinvoke v.<org.junit.rules.ExpectedExceptionMatcherBuilder: boolean expectsThrowable()>();
return v;
}
private void handleException(java.lang.Throwable) throws java.lang.Throwable
{
java.lang.Throwable v;
org.junit.rules.ExpectedExceptionMatcherBuilder v;
org.hamcrest.Matcher v;
org.junit.rules.ExpectedException v;
boolean v;
v := @this: org.junit.rules.ExpectedException;
v := @parameter: java.lang.Throwable;
v = virtualinvoke v.<org.junit.rules.ExpectedException: boolean isAnyExceptionExpected()>();
if v == 0 goto label;
v = v.<org.junit.rules.ExpectedException: org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder>;
v = virtualinvoke v.<org.junit.rules.ExpectedExceptionMatcherBuilder: org.hamcrest.Matcher build()>();
staticinvoke <org.junit.Assert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
goto label;
label:
throw v;
label:
return;
}
private void failDueToMissingException() throws java.lang.AssertionError
{
java.lang.String v;
org.junit.rules.ExpectedException v;
v := @this: org.junit.rules.ExpectedException;
v = specialinvoke v.<org.junit.rules.ExpectedException: java.lang.String missingExceptionMessage()>();
staticinvoke <org.junit.Assert: void fail(java.lang.String)>(v);
return;
}
private java.lang.String missingExceptionMessage()
{
java.lang.Object[] v;
org.junit.rules.ExpectedExceptionMatcherBuilder v;
org.hamcrest.Matcher v;
java.lang.String v, v, v;
org.junit.rules.ExpectedException v;
v := @this: org.junit.rules.ExpectedException;
v = v.<org.junit.rules.ExpectedException: org.junit.rules.ExpectedExceptionMatcherBuilder matcherBuilder>;
v = virtualinvoke v.<org.junit.rules.ExpectedExceptionMatcherBuilder: org.hamcrest.Matcher build()>();
v = staticinvoke <org.hamcrest.StringDescription: java.lang.String toString(org.hamcrest.SelfDescribing)>(v);
v = v.<org.junit.rules.ExpectedException: java.lang.String missingExceptionMessage>;
v = newarray (java.lang.Object)[1];
v[0] = v;
v = staticinvoke <java.lang.String: java.lang.String format(java.lang.String,java.lang.Object[])>(v, v);
return v;
}
}