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

KeyboardStateQualifierTest

public class KeyboardStateQualifierTest extends TestCase

Fields Summary
private KeyboardStateQualifier
ksq
private FolderConfiguration
config
Constructors Summary
Methods Summary
protected voidsetUp()

        super.setUp();
        ksq = new KeyboardStateQualifier();
        config = new FolderConfiguration();
    
protected voidtearDown()

        super.tearDown();
        ksq = null;
        config = null;
    
public voidtestExposed()

        assertEquals(true, ksq.checkAndSet("keysexposed", config)); //$NON-NLS-1$
        assertTrue(config.getKeyboardStateQualifier() != null);
        assertEquals(KeyboardStateQualifier.KeyboardState.EXPOSED,
                config.getKeyboardStateQualifier().getValue());
        assertEquals("keysexposed", config.getKeyboardStateQualifier().toString()); //$NON-NLS-1$
    
public voidtestFailures()

        assertEquals(false, ksq.checkAndSet("", config));//$NON-NLS-1$
        assertEquals(false, ksq.checkAndSet("KEYSEXPOSED", config));//$NON-NLS-1$
        assertEquals(false, ksq.checkAndSet("other", config));//$NON-NLS-1$
    
public voidtestHidden()

        assertEquals(true, ksq.checkAndSet("keyshidden", config)); //$NON-NLS-1$
        assertTrue(config.getKeyboardStateQualifier() != null);
        assertEquals(KeyboardStateQualifier.KeyboardState.HIDDEN,
                config.getKeyboardStateQualifier().getValue());
        assertEquals("keyshidden", config.getKeyboardStateQualifier().toString()); //$NON-NLS-1$