3233343536373839404142
*/ public void testInt() { Translator t = new SmartTranslator(); Object result = t.translate(null, int.class, "-37"); assertEquals(new Integer(-37), result); } public void testBlankInput()
4142434445464748495051
public void testBlankInput() { Translator t = new SmartTranslator(); assertNull(t.translate(null, int.class, "")); } public void testDefault() { Translator t = new SmartTranslator("default=100");
4849505152535455565758
public void testDefault() { Translator t = new SmartTranslator("default=100"); Object result = t.translate(null, int.class, ""); assertEquals(new Integer(100), result); } /**
6061626364656667686970
*/ public void testDouble() { Translator t = new SmartTranslator(); Object result = t.translate(null, Double.class, "3.14"); assertEquals(new Double("3.14"), result); } public void testNoEditor()
7172737475767778798081
{ Translator t = new SmartTranslator(); try { t.translate(null, Registry.class, "fred"); unreachable(); } catch (ApplicationRuntimeException ex) {
3334353637383940414243
*/ public void testInt() { Translator t = new SmartTranslator(); Object result = t.translate(null, int.class, "-37", null); assertEquals(new Integer(-37), result); } public void testNullInput()
4243444546474849505152
public void testNullInput() { Translator t = new SmartTranslator(); assertNull(t.translate(null, int.class, null, null)); } public void testBlankInput() { Translator t = new SmartTranslator();
4950515253545556575859
public void testBlankInput() { Translator t = new SmartTranslator(); assertEquals("", t.translate(null, String.class, "", null)); } public void testDefault() { Translator t = new SmartTranslator("default=100");
5657585960616263646566
public void testDefault() { Translator t = new SmartTranslator("default=100"); Object result = t.translate(null, int.class, null, null); assertEquals(new Integer(100), result); } /**
6869707172737475767778
*/ public void testDouble() { Translator t = new SmartTranslator(); Object result = t.translate(null, Double.class, "3.14", null); assertEquals(new Double("3.14"), result); } /**