edu.rice.cs.drjava.config
Class KeyStrokeOptionTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.rice.cs.drjava.DrJavaTestCase
edu.rice.cs.drjava.config.KeyStrokeOptionTest
- All Implemented Interfaces:
- Test
public final class KeyStrokeOptionTest
- extends DrJavaTestCase
Class according to the JUnit protocol. Tests the proper functionality of the class KeyStrokeOption.
- Version:
- $Id: KeyStrokeOptionTest.java 4504 2008-06-03 06:19:20Z rcartwright $
Method Summary |
static void |
main(String[] args)
Main method called by testLocalSpecificFormat. |
void |
testFormat()
Test the format method by comparing a KeyStroke object to itself after it has been formatted to a string and
parsed back into a KeyStroke object. |
void |
testGetName()
|
void |
testLocaleSpecificFormat()
Tests that key strokes are output in a parseable format even in foreign locales. |
void |
testParse()
|
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
KeyStrokeOptionTest
public KeyStrokeOptionTest(String name)
- Parameters:
name
- The name of this test case.
testGetName
public void testGetName()
testParse
public void testParse()
testFormat
public void testFormat()
- Test the format method by comparing a KeyStroke object to itself after it has been formatted to a string and
parsed back into a KeyStroke object. We cannot compare strings because format always puts the modifiers in the
same order which could be a different order than the user specifies.
testLocaleSpecificFormat
public void testLocaleSpecificFormat()
throws IOException,
InterruptedException
- Tests that key strokes are output in a parseable format even in foreign locales. The test must be run in a
separate JVM, because once the locale is changed, it cannot be restored. (If someone can figure out how
to effectively set it back, feel free to remove this hack!)
- Throws:
IOException
InterruptedException
main
public static void main(String[] args)
- Main method called by testLocalSpecificFormat. Runs in new JVM to avoid corrupting the locale of other tests.