public void setup(QAConfig sysConfig) throws Exception {
original = System.getSecurityManager();
}
public void run() throws Exception {
MarshalOutputStream stream;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ArrayList al = new ArrayList();
PipedOutputStream pos = new PipedOutputStream();
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 1: "
+ "MarshalOutputStream(null,null)");
logger.log(Level.FINE,"");
try {
stream = new MarshalOutputStream(null,null);
assertion(false);
} catch (NullPointerException ignore) {
}
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 2: "
+ "MarshalOutputStream(OutputStream,null)");
logger.log(Level.FINE,"");
try {
stream = new MarshalOutputStream(baos,null);
assertion(false);
} catch (NullPointerException ignore) {
}
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 3: "
+ "MarshalOutputStream(null,Collection)");
logger.log(Level.FINE,"");
try {
stream = new MarshalOutputStream(null,al);
assertion(false);
} catch (NullPointerException ignore) {
}
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 4: "
+ "getObjectStreamContext method returns constructor arg");
logger.log(Level.FINE,"");
stream = new MarshalOutputStream(baos,al);
assertion(stream.getObjectStreamContext() == al);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 5: "
+ "constructor throws IOException");
logger.log(Level.FINE,"");
try {
stream = new MarshalOutputStream(pos,al);
assertion(false);
} catch (IOException ignore) {
}
logger.log(Level.FINE,"=================================");