TextInputMethodQualifierTestpublic class TextInputMethodQualifierTest extends TestCase
Fields Summary |
---|
private TextInputMethodQualifier | timq | private FolderConfiguration | config |
Methods Summary |
---|
protected void | setUp()
super.setUp();
timq = new TextInputMethodQualifier();
config = new FolderConfiguration();
| protected void | tearDown()
super.tearDown();
timq = null;
config = null;
| public void | test12Key()
assertEquals(true, timq.checkAndSet("12key", config)); //$NON-NLS-1$
assertTrue(config.getTextInputMethodQualifier() != null);
assertEquals(TextInputMethodQualifier.TextInputMethod.TWELVEKEYS,
config.getTextInputMethodQualifier().getValue());
assertEquals("12key", config.getTextInputMethodQualifier().toString()); //$NON-NLS-1$
| public void | testFailures()
assertEquals(false, timq.checkAndSet("", config));//$NON-NLS-1$
assertEquals(false, timq.checkAndSet("QWERTY", config));//$NON-NLS-1$
assertEquals(false, timq.checkAndSet("12keys", config));//$NON-NLS-1$
assertEquals(false, timq.checkAndSet("*12key", config));//$NON-NLS-1$
assertEquals(false, timq.checkAndSet("other", config));//$NON-NLS-1$
| public void | testNoKey()
assertEquals(true, timq.checkAndSet("nokeys", config)); //$NON-NLS-1$
assertTrue(config.getTextInputMethodQualifier() != null);
assertEquals(TextInputMethodQualifier.TextInputMethod.NOKEY,
config.getTextInputMethodQualifier().getValue());
assertEquals("nokeys", config.getTextInputMethodQualifier().toString()); //$NON-NLS-1$
| public void | testQuerty()
assertEquals(true, timq.checkAndSet("qwerty", config)); //$NON-NLS-1$
assertTrue(config.getTextInputMethodQualifier() != null);
assertEquals(TextInputMethodQualifier.TextInputMethod.QWERTY,
config.getTextInputMethodQualifier().getValue());
assertEquals("qwerty", config.getTextInputMethodQualifier().toString()); //$NON-NLS-1$
|
|