public class PreventSystemExit extends Object implements TestConfigurationIF
Constructor and Description |
---|
PreventSystemExit() |
Modifier and Type | Method and Description |
---|---|
boolean |
getExitCalled()
Checks whether System.exit() has been called after reset().
|
int |
getExitValue()
Looks up the value given to the latest invocation of System.exit()
|
void |
reset()
Resets internal state.
|
void |
setUp()
Stores original SecurityManager and set a new one blocking System.exit() Calls reset().
|
void |
tearDown()
Restores original SecurityManager.
|
public PreventSystemExit()
public void setUp()
setUp
in interface TestConfigurationIF
public void reset()
public void tearDown()
tearDown
in interface TestConfigurationIF
public boolean getExitCalled()
public int getExitValue()
Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.