List of usage examples for android.util AndroidRuntimeException getMessage
public String getMessage()
From source file:com.albedinsky.android.support.intent.IntentBaseTest.java
static void assertBuildThrowsExceptionWithCause(BaseIntent intent, String cause) { try {/* ww w. jav a2 s . c o m*/ intent.build(); } catch (AndroidRuntimeException e) { final String message = "Cannot build " + intent.getClass().getSimpleName() + ". " + cause; final String eMessage = e.getMessage(); if (!message.contentEquals(eMessage)) { throw new AssertionError( "Expected exception with message <" + message + "> but message was <" + eMessage + ">"); } return; } final String intentName = intent.getClass().getSimpleName(); throw new AssertionError("No exception has been thrown while building intent(" + intentName + ")."); }