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

RegionQualifierTest

public class RegionQualifierTest extends TestCase

Fields Summary
private RegionQualifier
rq
private FolderConfiguration
config
Constructors Summary
Methods Summary
protected voidsetUp()

        super.setUp();

        rq = new RegionQualifier();
        config = new FolderConfiguration();
    
protected voidtearDown()

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

        assertEquals(true, rq.checkAndSet("rUS", config));//$NON-NLS-1$
        assertTrue(config.getRegionQualifier() != null);
        assertEquals("US", config.getRegionQualifier().getValue()); //$NON-NLS-1$
        assertEquals("rUS", config.getRegionQualifier().toString()); //$NON-NLS-1$
    
public voidtestFailures()

        assertEquals(false, rq.checkAndSet("", config));//$NON-NLS-1$
        assertEquals(false, rq.checkAndSet("rus", config));//$NON-NLS-1$
        assertEquals(false, rq.checkAndSet("rUSA", config));//$NON-NLS-1$
        assertEquals(false, rq.checkAndSet("abc", config));//$NON-NLS-1$