blob: 24ba397ed6c9f432856f777cd8ca8ea07913498d [file] [log] [blame]
class StaticMessageTest extends GroovyTestCase {
void testStaticMissingMethodException() {
try {
Integer.foobarbaz()
} catch (MissingMethodException mme) {
assert mme.message ==~ '.*static.*'
}
}
void testInstanceMissingMethodException() {
try {
Integer x = 5;
x.foobarbaz()
} catch (MissingMethodException mme) {
assert ! (mme.message ==~ '.*static.*')
}
}
}