FileDocCategorySizeDatePackage
TextInputMethodQualifierTest.javaAPI DocAndroid 1.5 API2869Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.resources.configurations

TextInputMethodQualifierTest

public class TextInputMethodQualifierTest extends TestCase

Fields Summary
private TextInputMethodQualifier
timq
private FolderConfiguration
config
Constructors Summary
Methods Summary
protected voidsetUp()

        super.setUp();
        timq = new TextInputMethodQualifier();
        config = new FolderConfiguration();
    
protected voidtearDown()

        super.tearDown();
        timq = null;
        config = null;
    
public voidtest12Key()

        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 voidtestFailures()

        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 voidtestNoKey()

        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 voidtestQuerty()

        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$