String[] testCaseName = { TestContentLengthOutputStream.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
public void testConstructors() throws Exception {
new ContentLengthOutputStream(new HttpDataTransmitterMockup(), 10L);
try {
new ContentLengthOutputStream(null, 10L);
fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
new ContentLengthOutputStream(new HttpDataTransmitterMockup(), -10);
fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
}