private void setExistingDirsFilter() { context.checking( new Expectations() { { allowing(existentDirsFilterMock) .checkExistenceAndThrowStopActionIfNot(TEST_TEST_CLASSES_DIR); } }); test.existingDirsFilter = existentDirsFilterMock; }
@org.junit.Test public void testExecuteWithNonExistingCompiledTestsDir() { setUpMocks(test); test.setUnmanagedClasspath(null); context.checking( new Expectations() { { allowing(existentDirsFilterMock) .checkExistenceAndThrowStopActionIfNot(TEST_TEST_CLASSES_DIR); will(throwException(new StopActionException())); } }); test.existingDirsFilter = existentDirsFilterMock; test.execute(); }