Methods Summary |
---|
public void | setUp()
stream = new DummyStream();
|
public void | tearDown()
if (stream != null) {
stream.close();
}
|
public void | testCloseArray()
writeByteArray();
stream.close();
stream.assertInvoked();
stream = null;
|
public void | testCloseSingleBytes()
writeSingleBytes();
stream.close();
stream.assertInvoked();
stream = null;
|
public void | testFlushArray()
writeByteArray();
stream.flush();
stream.assertInvoked();
|
public void | testFlushSingleBytes()
writeSingleBytes();
stream.flush();
stream.assertInvoked();
|
public void | testLineWithCariagereturnArray()
writeByteArray();
writeAsArray('\r");
stream.assertInvoked();
|
public void | testLineWithCariagereturnLinefeedArray()
writeByteArray();
writeAsArray('\r");
writeAsArray('\n");
stream.assertInvoked();
|
public void | testLineWithCariagereturnLinefeedSingleBytes()
writeSingleBytes();
stream.write('\r");
stream.write('\n");
stream.assertInvoked();
|
public void | testLineWithCariagereturnSingleBytes()
writeSingleBytes();
stream.write('\r");
stream.assertInvoked();
|
public void | testLineWithLinefeedArray()
writeByteArray();
writeAsArray('\n");
stream.assertInvoked();
|
public void | testLineWithLinefeedSingleBytes()
writeSingleBytes();
stream.write('\n");
stream.assertInvoked();
|
private void | writeAsArray(char c)
stream.write(new byte[] {(byte) c}, 0, 1);
|
private void | writeByteArray()
stream.write(LINE.getBytes(), 0, LINE.length());
|
private void | writeSingleBytes()
byte[] b = LINE.getBytes();
for (int i = 0; i < b.length; i++) {
stream.write(b[i]);
}
|