String[] testCaseName = { TestDefaultEntitySerializer.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
public void testIllegalGenerateArg() throws Exception {
EntitySerializer entitywriter = new DefaultEntitySerializer();
try {
entitywriter.serialize(null, null, null);
fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
entitywriter.serialize(new HttpDataTransmitterMockup() , null, null);
fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
try {
entitywriter.serialize(new HttpDataTransmitterMockup() , new HttpMessageMockup(), null);
fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
// expected
}
}