ScreenOrientationQualifierTestpublic class ScreenOrientationQualifierTest extends TestCase
Fields Summary |
---|
private ScreenOrientationQualifier | soq | private FolderConfiguration | config |
Methods Summary |
---|
protected void | setUp()
super.setUp();
soq = new ScreenOrientationQualifier();
config = new FolderConfiguration();
| protected void | tearDown()
super.tearDown();
soq = null;
config = null;
| public void | testFailures()
assertEquals(false, soq.checkAndSet("", config));//$NON-NLS-1$
assertEquals(false, soq.checkAndSet("PORT", config));//$NON-NLS-1$
assertEquals(false, soq.checkAndSet("landscape", config));//$NON-NLS-1$
assertEquals(false, soq.checkAndSet("portrait", config));//$NON-NLS-1$
assertEquals(false, soq.checkAndSet("other", config));//$NON-NLS-1$
| public void | testLanscape()
assertEquals(true, soq.checkAndSet("land", config)); //$NON-NLS-1$
assertTrue(config.getScreenOrientationQualifier() != null);
assertEquals(ScreenOrientationQualifier.ScreenOrientation.LANDSCAPE,
config.getScreenOrientationQualifier().getValue());
assertEquals("land", config.getScreenOrientationQualifier().toString()); //$NON-NLS-1$
| public void | testPortrait()
assertEquals(true, soq.checkAndSet("port", config)); //$NON-NLS-1$
assertTrue(config.getScreenOrientationQualifier() != null);
assertEquals(ScreenOrientationQualifier.ScreenOrientation.PORTRAIT,
config.getScreenOrientationQualifier().getValue());
assertEquals("port", config.getScreenOrientationQualifier().toString()); //$NON-NLS-1$
| public void | testSquare()
assertEquals(true, soq.checkAndSet("square", config)); //$NON-NLS-1$
assertTrue(config.getScreenOrientationQualifier() != null);
assertEquals(ScreenOrientationQualifier.ScreenOrientation.SQUARE,
config.getScreenOrientationQualifier().getValue());
assertEquals("square", config.getScreenOrientationQualifier().toString()); //$NON-NLS-1$
|
|