use of tests.support.Support_ASimpleInputStream in project robovm by robovm.
the class Test method test_readLine_IOException.
public void test_readLine_IOException() throws IOException {
oos.writeObject(testString);
oos.close();
Support_ASimpleInputStream sis = new Support_ASimpleInputStream(bao.toByteArray());
ois = new ObjectInputStream(sis);
sis.throwExceptionOnNextUse = true;
try {
ois.readLine();
fail("Test 1: IOException expected.");
} catch (IOException e) {
// Expected.
}
sis.throwExceptionOnNextUse = false;
ois.close();
}
use of tests.support.Support_ASimpleInputStream in project robovm by robovm.
the class Test method test_ConstructorLjava_io_InputStream_IOException.
public void test_ConstructorLjava_io_InputStream_IOException() throws IOException {
oos.writeObject(testString);
oos.close();
Support_ASimpleInputStream sis = new Support_ASimpleInputStream(bao.toByteArray());
sis.throwExceptionOnNextUse = true;
try {
ois = new ObjectInputStream(sis);
fail("Test 1: IOException expected.");
} catch (IOException e) {
// Expected.
}
sis.throwExceptionOnNextUse = false;
}
Aggregations