@Test(expected=IllegalArgumentException)
void testNullArgument()
{
archiveUtility.process(lstFileName, "", workflowId)
}
When I call process method on archiveUtility object it throws an IllegalArgumentException but my test still fails even though I have declared the test to expect IllegalArgumentException. This is a groovyTestCase. Am unable to figure out why so ? Any thoughts ?
In GroovyTestCase you can use shouldFail. Try this: