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

LanguageQualifierTest

public class LanguageQualifierTest extends TestCase

Fields Summary
private FolderConfiguration
config
private LanguageQualifier
lq
Constructors Summary
Methods Summary
public voidsetUp()

        super.setUp();
        config = new FolderConfiguration();
        lq = new LanguageQualifier();
    
protected voidtearDown()

        super.tearDown();
        config = null;
        lq = null;
    
public voidtestCheckAndSet()

        assertEquals(true, lq.checkAndSet("en", config)); //$NON-NLS-1$
        assertTrue(config.getLanguageQualifier() != null);
        assertEquals("en", config.getLanguageQualifier().toString()); //$NON-NLS-1$
        
    
public voidtestFailures()

        assertEquals(false, lq.checkAndSet("", config)); //$NON-NLS-1$
        assertEquals(false, lq.checkAndSet("EN", config)); //$NON-NLS-1$
        assertEquals(false, lq.checkAndSet("abc", config)); //$NON-NLS-1$