assertNull(t.translate(null, null, null, null));
}
public void testBadClass() throws Exception
{
InstanceTranslator t = new InstanceTranslator();
ElementImpl e = new ElementImpl();
Location l = new LocationImpl(getResource("TestObjectTranslator.class"), 50);
e.setLocation(l);
MockControl c = newControl(Module.class);
Module m = (Module) c.getMock();
m.getClassResolver();
c.setReturnValue(new DefaultClassResolver());
replayControls();
try
{
t.translate(m, null, "bad.class.Name", null);
}
catch (ApplicationRuntimeException ex)
{
assertExceptionSubstring(ex, "Could not load class bad.class.Name");
}