diff options
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/testplugin/util/ExpectedStringsTests.java')
-rw-r--r-- | core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/testplugin/util/ExpectedStringsTests.java | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/testplugin/util/ExpectedStringsTests.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/testplugin/util/ExpectedStringsTests.java deleted file mode 100644 index 30d67776b34..00000000000 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/testplugin/util/ExpectedStringsTests.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.eclipse.cdt.testplugin.util; - -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * @author Peter Graves - * - *Some simple tests to make sure our ExtraStrings class seems to work. - */ -public class ExpectedStringsTests extends TestCase { - - /** - * Constructor for ExpectedStringsTests. - * @param name - */ - public ExpectedStringsTests(String name) { - super(name); - } - /** - * Sets up the test fixture. - * - * Called before every test case method. - * - * Example code test the packages in the project - * "com.qnx.tools.ide.cdt.core" - */ - protected void setUp() { - - - } - - /** - * Tears down the test fixture. - * - * Called after every test case method. - */ - protected void tearDown() { - // release resources here and clean-up - } - - public static TestSuite suite() { - return new TestSuite(ExpectedStringsTests.class); - } - - public static void main (String[] args){ - junit.textui.TestRunner.run(suite()); - } - - public void testGotAll() { - ExpectedStrings myExp; - String[] strings= {"stringOne", "stringTwo", "stringThree" }; - - myExp=new ExpectedStrings(strings); - assertTrue("No found strings", !myExp.gotAll()); - myExp.foundString("stringOne"); - assertTrue("1 found strings", !myExp.gotAll()); - myExp.foundString("stringTwo"); - assertTrue("2 found strings", !myExp.gotAll()); - myExp.foundString("stringThree"); - assertTrue("All found strings", myExp.gotAll()); - - - } - public void testGotExtra () { - ExpectedStrings myExp; - String[] strings= {"stringOne", "stringTwo", "stringThree" }; - - myExp=new ExpectedStrings(strings); - assertTrue("No found strings", !myExp.gotExtra()); - myExp.foundString("stringOne"); - assertTrue("1 found strings", !myExp.gotExtra()); - myExp.foundString("stringTwo"); - assertTrue("2 found strings", !myExp.gotExtra()); - myExp.foundString("stringThree"); - assertTrue("All found strings", !myExp.gotExtra()); - myExp.foundString("Somerandomestring"); - assertTrue("Extra String", myExp.gotExtra()); - - } - - public void testGetMissingString() - { - ExpectedStrings myExp; - String[] strings= {"stringOne", "stringTwo", "stringThree" }; - - myExp=new ExpectedStrings(strings); - assertNotNull(myExp.getMissingString()); - myExp.foundString("stringOne"); - assertNotNull(myExp.getMissingString()); - myExp.foundString("stringTwo"); - assertNotNull(myExp.getMissingString()); - myExp.foundString("stringThree"); - assertNotNull(myExp.getMissingString()); - - } - - public void testGetExtraString() - { - ExpectedStrings myExp; - String[] strings= {"stringOne", "stringTwo", "stringThree" }; - - myExp=new ExpectedStrings(strings); - assertNotNull(myExp.getExtraString()); - myExp.foundString("stringOnenot"); - assertNotNull(myExp.getMissingString()); - myExp.foundString("stringTwonot"); - assertNotNull(myExp.getMissingString()); - - } - - - -} |