Source Code Cross Referenced for JavaCompletionProviderBasicTest.java in  » IDE-Netbeans » java » org » netbeans » modules » java » editor » completion » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » java » org.netbeans.modules.java.editor.completion 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003:         *
0004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005:         *
0006:         * The contents of this file are subject to the terms of either the GNU
0007:         * General Public License Version 2 only ("GPL") or the Common
0008:         * Development and Distribution License("CDDL") (collectively, the
0009:         * "License"). You may not use this file except in compliance with the
0010:         * License. You can obtain a copy of the License at
0011:         * http://www.netbeans.org/cddl-gplv2.html
0012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013:         * specific language governing permissions and limitations under the
0014:         * License.  When distributing the software, include this License Header
0015:         * Notice in each file and include the License file at
0016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
0017:         * particular file as subject to the "Classpath" exception as provided
0018:         * by Sun in the GPL Version 2 section of the License file that
0019:         * accompanied this code. If applicable, add the following below the
0020:         * License Header, with the fields enclosed by brackets [] replaced by
0021:         * your own identifying information:
0022:         * "Portions Copyrighted [year] [name of copyright owner]"
0023:         *
0024:         * Contributor(s):
0025:         *
0026:         * The Original Software is NetBeans. The Initial Developer of the Original
0027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
0028:         * Microsystems, Inc. All Rights Reserved.
0029:         *
0030:         * If you wish your version of this file to be governed by only the CDDL
0031:         * or only the GPL Version 2, indicate your decision by adding
0032:         * "[Contributor] elects to include this software in this distribution
0033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034:         * single choice of license, a recipient has the option to distribute
0035:         * your version of this file under either the CDDL, the GPL Version 2 or
0036:         * to extend the choice of license to its licensees as provided above.
0037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
0038:         * Version 2 license, then the option applies only if the new code is
0039:         * made subject to such option by the copyright holder.
0040:         */
0041:
0042:        package org.netbeans.modules.java.editor.completion;
0043:
0044:        /**
0045:         *
0046:         * @author Dusan Balek
0047:         */
0048:        public class JavaCompletionProviderBasicTest extends CompletionTestBase {
0049:
0050:            public JavaCompletionProviderBasicTest(String testName) {
0051:                super (testName);
0052:            }
0053:
0054:            // file beginning tests ----------------------------------------------------
0055:
0056:            public void testEmptyFile() throws Exception {
0057:                performTest("Empty", 0, null, "topLevelKeywords.pass");
0058:            }
0059:
0060:            public void testFileBeginning() throws Exception {
0061:                performTest("Simple", 0, null, "topLevelKeywords.pass");
0062:            }
0063:
0064:            // package declaration tests -----------------------------------------------
0065:
0066:            public void testEmptyFileTypingPackageKeyword() throws Exception {
0067:                performTest("Empty", 0, "p",
0068:                        "topLevelKeywordsStartingWithP.pass");
0069:            }
0070:
0071:            public void testTypingPackageKeyword() throws Exception {
0072:                performTest("SimpleNoPackage", 0, "p",
0073:                        "topLevelKeywordsStartingWithP.pass");
0074:            }
0075:
0076:            public void testOnPackageKeyword() throws Exception {
0077:                performTest("Simple", 1, null,
0078:                        "topLevelKeywordsStartingWithP.pass");
0079:            }
0080:
0081:            public void testEmptyFileAfterTypingPackageKeyword()
0082:                    throws Exception {
0083:                performTest("Empty", 0, "package", "packageKeyword.pass");
0084:            }
0085:
0086:            public void testAfterTypingPackageKeyword() throws Exception {
0087:                performTest("SimpleNoPackage", 0, "package",
0088:                        "packageKeyword.pass");
0089:            }
0090:
0091:            public void testAfterPackageKeyword() throws Exception {
0092:                performTest("Simple", 7, null, "packageKeyword.pass");
0093:            }
0094:
0095:            public void testEmptyFileBeforeTypingPackageId() throws Exception {
0096:                performTest("Empty", 0, "package ", "allPackages.pass");
0097:            }
0098:
0099:            public void testBeforeTypingPackageId() throws Exception {
0100:                performTest("SimpleNoPackage", 0, "package ",
0101:                        "allPackages.pass");
0102:            }
0103:
0104:            public void testBeforePackageId() throws Exception {
0105:                performTest("Simple", 8, null, "allPackages.pass");
0106:            }
0107:
0108:            public void testEmptyFileTypingPackageId() throws Exception {
0109:                performTest("Empty", 0, "package t", "empty.pass");
0110:            }
0111:
0112:            public void testTypingPackageId() throws Exception {
0113:                performTest("SimpleNoPackage", 0, "package t", "empty.pass");
0114:            }
0115:
0116:            public void testOnPackageId() throws Exception {
0117:                performTest("Simple", 9, null, "empty.pass");
0118:            }
0119:
0120:            public void testEmptyFileAfterTypingPackageId() throws Exception {
0121:                performTest("Empty", 0, "package test", "empty.pass");
0122:            }
0123:
0124:            public void testAfterTypingPackageId() throws Exception {
0125:                performTest("SimpleNoPackage", 0, "package test", "empty.pass");
0126:            }
0127:
0128:            public void testAfterPackageId() throws Exception {
0129:                performTest("Simple", 12, null, "empty.pass");
0130:            }
0131:
0132:            public void testEmptyFileAfterTypingPackageIdAndSpace()
0133:                    throws Exception {
0134:                performTest("Empty", 0, "package test ", "empty.pass");
0135:            }
0136:
0137:            public void testAfterTypingPackageIdAndSpace() throws Exception {
0138:                performTest("SimpleNoPackage", 0, "package test ", "empty.pass");
0139:            }
0140:
0141:            public void testAfterPackageIdAndSpace() throws Exception {
0142:                performTest("Simple", 12, " ", "empty.pass");
0143:            }
0144:
0145:            public void testEmptyFileAfterTypingPackageDecl() throws Exception {
0146:                performTest("Empty", 0, "package test;",
0147:                        "topLevelKeywordsWithoutPackage.pass");
0148:            }
0149:
0150:            public void testAfterTypingPackageDecl() throws Exception {
0151:                performTest("SimpleNoPackage", 0, "package test;",
0152:                        "topLevelKeywordsWithoutPackage.pass");
0153:            }
0154:
0155:            public void testAfterPackageDecl() throws Exception {
0156:                performTest("Simple", 13, null,
0157:                        "topLevelKeywordsWithoutPackage.pass");
0158:            }
0159:
0160:            // import declaration tests ------------------------------------------------
0161:
0162:            public void testEmptyFileAfterTypingImportKeyword()
0163:                    throws Exception {
0164:                performTest("Empty", 0, "import", "importKeyword.pass");
0165:            }
0166:
0167:            public void testAfterTypingImportKeyword() throws Exception {
0168:                performTest("Simple", 14, "import", "importKeyword.pass");
0169:            }
0170:
0171:            public void testAfterImportKeyword() throws Exception {
0172:                performTest("Import", 21, null, "importKeyword.pass");
0173:            }
0174:
0175:            public void testEmptyFileBeforeTypingImportedPackage()
0176:                    throws Exception {
0177:                performTest("Empty", 0, "import ",
0178:                        "staticKeywordAndAllPackages.pass");
0179:            }
0180:
0181:            public void testBeforeTypingImportedPackage() throws Exception {
0182:                performTest("Simple", 14, "import ",
0183:                        "staticKeywordAndAllPackages.pass");
0184:            }
0185:
0186:            public void testBeforeImportedPackage() throws Exception {
0187:                performTest("Import", 22, null,
0188:                        "staticKeywordAndAllPackages.pass");
0189:            }
0190:
0191:            public void testEmptyFileTypingImportedPackage() throws Exception {
0192:                performTest("Empty", 0, "import j",
0193:                        "packagesStartingWithJ.pass");
0194:            }
0195:
0196:            public void testTypingImportedPackage() throws Exception {
0197:                performTest("Simple", 14, "import j",
0198:                        "packagesStartingWithJ.pass");
0199:            }
0200:
0201:            public void testOnImportedPackage() throws Exception {
0202:                performTest("Import", 23, null, "packagesStartingWithJ.pass");
0203:            }
0204:
0205:            public void testEmptyFileTypingImportedPackageBeforeStar()
0206:                    throws Exception {
0207:                performTest("Empty", 0, "import java.util.",
0208:                        "javaUtilContent.pass");
0209:            }
0210:
0211:            public void testTypingImportedPackageBeforeStar() throws Exception {
0212:                performTest("Simple", 14, "import java.util.",
0213:                        "javaUtilContent.pass");
0214:            }
0215:
0216:            public void testOnImportedPackageBeforeStar() throws Exception {
0217:                performTest("Import", 54, null, "javaUtilContent.pass");
0218:            }
0219:
0220:            public void testEmptyFileAfterTypingImportedPackage()
0221:                    throws Exception {
0222:                performTest("Empty", 0, "import java.util.*", "empty.pass");
0223:            }
0224:
0225:            public void testAfterTypingImportedPackage() throws Exception {
0226:                performTest("Simple", 14, "import java.util.*", "empty.pass");
0227:            }
0228:
0229:            public void testAfterImportedPackage() throws Exception {
0230:                performTest("Import", 55, null, "empty.pass");
0231:            }
0232:
0233:            public void testEmptyFileAfterTypingImportedClass()
0234:                    throws Exception {
0235:                performTest("Empty", 0, "import java.awt.List", "list.pass");
0236:            }
0237:
0238:            public void testAfterTypingImportedClass() throws Exception {
0239:                performTest("Simple", 14, "import java.awt.List", "list.pass");
0240:            }
0241:
0242:            public void testAfterImportedClass() throws Exception {
0243:                performTest("Import", 35, null, "list.pass");
0244:            }
0245:
0246:            public void testEmptyFileAfterTypingImportedClassAndSpace()
0247:                    throws Exception {
0248:                performTest("Empty", 0, "import java.awt.List ", "empty.pass");
0249:            }
0250:
0251:            public void testAfterTypingImportedClassAndSpace() throws Exception {
0252:                performTest("Simple", 14, "import java.awt.List ", "empty.pass");
0253:            }
0254:
0255:            public void testAfterImportedClassAndSpace() throws Exception {
0256:                performTest("Import", 35, " ", "empty.pass");
0257:            }
0258:
0259:            public void testEmptyFileAfterTypingImportStatement()
0260:                    throws Exception {
0261:                performTest("Empty", 0, "import java.awt.List;",
0262:                        "topLevelKeywordsWithoutPackage.pass");
0263:            }
0264:
0265:            public void testAfterTypingImportStatement() throws Exception {
0266:                performTest("Simple", 14, "import java.awt.List;",
0267:                        "topLevelKeywordsWithoutPackage.pass");
0268:            }
0269:
0270:            public void testAfterImportStatement() throws Exception {
0271:                performTest("Import", 36, null,
0272:                        "topLevelKeywordsWithoutPackage.pass");
0273:            }
0274:
0275:            public void testEmptyFileTypingStaticImportKeyword()
0276:                    throws Exception {
0277:                performTest("Empty", 0, "import st", "staticKeyword.pass");
0278:            }
0279:
0280:            public void testTypingStaticImportKeyword() throws Exception {
0281:                performTest("Simple", 14, "import st", "staticKeyword.pass");
0282:            }
0283:
0284:            public void testOnStaticImportKeyword() throws Exception {
0285:                performTest("Import", 66, null, "staticKeyword.pass");
0286:            }
0287:
0288:            public void testEmptyFileAfterTypingStaticImportKeyword()
0289:                    throws Exception {
0290:                performTest("Empty", 0, "import static", "staticKeyword.pass");
0291:            }
0292:
0293:            public void testAfterTypingStaticImportKeyword() throws Exception {
0294:                performTest("Simple", 14, "import static", "staticKeyword.pass");
0295:            }
0296:
0297:            public void testAfterStaticImportKeyword() throws Exception {
0298:                performTest("Import", 70, null, "staticKeyword.pass");
0299:            }
0300:
0301:            public void testEmptyFileBeforeTypingStaticallyImportedClass()
0302:                    throws Exception {
0303:                performTest("Empty", 0, "import static ", "allPackages.pass");
0304:            }
0305:
0306:            public void testBeforeTypingStaticallyImportedClass()
0307:                    throws Exception {
0308:                performTest("Simple", 14, "import static ", "allPackages.pass");
0309:            }
0310:
0311:            public void testBeforeStaticallyImportedClass() throws Exception {
0312:                performTest("Import", 71, null, "allPackages.pass");
0313:            }
0314:
0315:            public void testEmptyFileTypingImportedPackageAfterErrorInPackageDeclaration()
0316:                    throws Exception {
0317:                performTest("Empty", 0, "package \nimport j",
0318:                        "packagesStartingWithJ.pass");
0319:            }
0320:
0321:            public void testTypingStaticImportAfterErrorInPackageDeclaration()
0322:                    throws Exception {
0323:                performTest("SimpleNoPackage", 0, "package \nimport ",
0324:                        "staticKeywordAndAllPackages.pass");
0325:            }
0326:
0327:            public void testTypingStaticImportAfterErrorInPreviousImportDeclaration()
0328:                    throws Exception {
0329:                performTest("Simple", 14, "im\nimport ",
0330:                        "staticKeywordAndAllPackages.pass");
0331:            }
0332:
0333:            // class declaration tests -------------------------------------------------
0334:
0335:            public void testEmptyFileAfterTypingPublicKeyword()
0336:                    throws Exception {
0337:                performTest("Empty", 0, "package test;\npublic",
0338:                        "publicKeyword.pass");
0339:            }
0340:
0341:            public void testAfterPublicKeyword() throws Exception {
0342:                performTest("Simple", 21, null, "publicKeyword.pass");
0343:            }
0344:
0345:            public void testTypingFinalClass() throws Exception {
0346:                performTest("Simple", 21, " f", "finalKeyword.pass");
0347:            }
0348:
0349:            public void testAfterTypingFinalClass() throws Exception {
0350:                performTest("Simple", 21, " final", "finalKeyword.pass");
0351:            }
0352:
0353:            public void testEmptyFileBeforeTypingClassKeyword()
0354:                    throws Exception {
0355:                performTest("Empty", 0, "package test;\npublic ",
0356:                        "classModifiersWithoutPublic.pass");
0357:            }
0358:
0359:            public void testBeforeClassKeyword() throws Exception {
0360:                performTest("Simple", 22, null,
0361:                        "classModifiersWithoutPublic.pass");
0362:            }
0363:
0364:            public void testEmptyFileTypingClassKeyword() throws Exception {
0365:                performTest("Empty", 0, "package test;\npublic c",
0366:                        "classKeyword.pass");
0367:            }
0368:
0369:            public void testOnClassKeyword() throws Exception {
0370:                performTest("Simple", 23, null, "classKeyword.pass");
0371:            }
0372:
0373:            public void testEmptyFileAfterTypingClassKeyword() throws Exception {
0374:                performTest("Empty", 0, "package test;\npublic class",
0375:                        "classKeyword.pass");
0376:            }
0377:
0378:            public void testAfterClassKeyword() throws Exception {
0379:                performTest("Simple", 27, null, "classKeyword.pass");
0380:            }
0381:
0382:            public void testEmptyFileBeforeTypingClassName() throws Exception {
0383:                performTest("Empty", 0, "package test;\npublic class ",
0384:                        "empty.pass");
0385:            }
0386:
0387:            public void testBeforeClassName() throws Exception {
0388:                performTest("Simple", 28, null, "empty.pass");
0389:            }
0390:
0391:            public void testEmptyFileTypingClassName() throws Exception {
0392:                performTest("Empty", 0, "package test;\npublic class T",
0393:                        "empty.pass");
0394:            }
0395:
0396:            public void testOnClassName() throws Exception {
0397:                performTest("Simple", 29, null, "empty.pass");
0398:            }
0399:
0400:            public void testEmptyAfterFileTypingClassName() throws Exception {
0401:                performTest("Empty", 0, "package test;\npublic class Test",
0402:                        "empty.pass");
0403:            }
0404:
0405:            public void testAfterClassName() throws Exception {
0406:                performTest("Simple", 32, null, "empty.pass");
0407:            }
0408:
0409:            public void testEmptyFileBeforeTypingExtendsKeyword()
0410:                    throws Exception {
0411:                performTest("Empty", 0, "package test;\npublic class Test ",
0412:                        "extendsAndImplementsKeywords.pass");
0413:            }
0414:
0415:            public void testBeforeTypingExtendsKeyword() throws Exception {
0416:                performTest("SimpleNoExtendsAndImplements", 33, null,
0417:                        "extendsAndImplementsKeywords.pass");
0418:            }
0419:
0420:            public void testBeforeExtendsKeyword() throws Exception {
0421:                performTest("Simple", 33, null,
0422:                        "extendsAndImplementsKeywords.pass");
0423:            }
0424:
0425:            public void testEmptyFileTypingExtendsKeyword() throws Exception {
0426:                performTest("Empty", 0, "package test;\npublic class Test e",
0427:                        "extendsKeyword.pass");
0428:            }
0429:
0430:            public void testTypingExtendsKeyword() throws Exception {
0431:                performTest("SimpleNoExtendsAndImplements", 33, "e",
0432:                        "extendsKeyword.pass");
0433:            }
0434:
0435:            public void testOnExtendsKeyword() throws Exception {
0436:                performTest("Simple", 34, null, "extendsKeyword.pass");
0437:            }
0438:
0439:            public void testEmptyFileAfterTypingExtendsKeyword()
0440:                    throws Exception {
0441:                performTest("Empty", 0,
0442:                        "package test;\npublic class Test extends",
0443:                        "extendsKeyword.pass");
0444:            }
0445:
0446:            public void testAfterTypingExtendsKeyword() throws Exception {
0447:                performTest("SimpleNoExtendsAndImplements", 33, "extends",
0448:                        "extendsKeyword.pass");
0449:            }
0450:
0451:            public void testAfterExtendsKeyword() throws Exception {
0452:                performTest("Simple", 40, null, "extendsKeyword.pass");
0453:            }
0454:
0455:            public void testEmptyFileBeforeTypingExtendedObject()
0456:                    throws Exception {
0457:                performTest("Empty", 0,
0458:                        "package test;\npublic class Test extends ",
0459:                        "javaLangClasses.pass");
0460:            }
0461:
0462:            public void testBeforeTypingExtendedObject() throws Exception {
0463:                performTest("SimpleNoExtendsAndImplements", 33, "extends ",
0464:                        "javaLangClasses.pass");
0465:            }
0466:
0467:            public void testBeforeExtendedObject() throws Exception {
0468:                performTest("Simple", 41, null, "javaLangClasses.pass");
0469:            }
0470:
0471:            public void testEmptyFileTypingExtendedObject() throws Exception {
0472:                performTest("Empty", 0,
0473:                        "package test;\npublic class Test extends O",
0474:                        "javaLangClassesStartingWithO.pass");
0475:            }
0476:
0477:            public void testTypingExtendedObject() throws Exception {
0478:                performTest("SimpleNoExtendsAndImplements", 33, "extends O",
0479:                        "javaLangClassesStartingWithO.pass");
0480:            }
0481:
0482:            public void testOnExtendedObject() throws Exception {
0483:                performTest("Simple", 42, null,
0484:                        "javaLangClassesStartingWithO.pass");
0485:            }
0486:
0487:            public void testEmptyFileAfterTypingExtendedObject()
0488:                    throws Exception {
0489:                performTest("Empty", 0,
0490:                        "package test;\npublic class Test extends Object",
0491:                        "object.pass");
0492:            }
0493:
0494:            public void testAfterTypingExtendedObject() throws Exception {
0495:                performTest("SimpleNoExtendsAndImplements", 33,
0496:                        "extends Object", "object.pass");
0497:            }
0498:
0499:            public void testAfterExtendedObject() throws Exception {
0500:                performTest("Simple", 47, null, "object.pass");
0501:            }
0502:
0503:            public void testEmptyFileBeforeTypingImplementsKeyword()
0504:                    throws Exception {
0505:                performTest("Empty", 0,
0506:                        "package test;\npublic class Test extends Object ",
0507:                        "implementsKeyword.pass");
0508:            }
0509:
0510:            public void testBeforeTypingImplementsKeyword() throws Exception {
0511:                performTest("SimpleNoExtendsAndImplements", 33,
0512:                        "extends Object ", "implementsKeyword.pass");
0513:            }
0514:
0515:            public void testBeforeImplementsKeyword() throws Exception {
0516:                performTest("Simple", 48, null, "implementsKeyword.pass");
0517:            }
0518:
0519:            public void testEmptyFileTypingImplementsKeyword() throws Exception {
0520:                performTest("Empty", 0,
0521:                        "package test;\npublic class Test extends Object i",
0522:                        "implementsKeyword.pass");
0523:            }
0524:
0525:            public void testTypingImplementsKeyword() throws Exception {
0526:                performTest("SimpleNoExtendsAndImplements", 33, "i",
0527:                        "implementsKeyword.pass");
0528:            }
0529:
0530:            public void testOnImplementsKeyword() throws Exception {
0531:                performTest("Simple", 49, null, "implementsKeyword.pass");
0532:            }
0533:
0534:            public void testEmptyFileAfteTypingImplementsKeyword()
0535:                    throws Exception {
0536:                performTest(
0537:                        "Empty",
0538:                        0,
0539:                        "package test;\npublic class Test extends Object implements",
0540:                        "implementsKeyword.pass");
0541:            }
0542:
0543:            public void testAfterTypingImplementsKeyword() throws Exception {
0544:                performTest("SimpleNoExtendsAndImplements", 33, "implements",
0545:                        "implementsKeyword.pass");
0546:            }
0547:
0548:            public void testAfterImplementsKeyword() throws Exception {
0549:                performTest("Simple", 58, null, "implementsKeyword.pass");
0550:            }
0551:
0552:            public void testEmptyFileBeforeTypingImplementedInterface()
0553:                    throws Exception {
0554:                performTest(
0555:                        "Empty",
0556:                        0,
0557:                        "package test;\npublic class Test extends Object implements ",
0558:                        "javaLangInterfaces.pass");
0559:            }
0560:
0561:            public void testBeforeTypingImplementedInterface() throws Exception {
0562:                performTest("SimpleNoExtendsAndImplements", 33, "implements ",
0563:                        "javaLangInterfaces.pass");
0564:            }
0565:
0566:            public void testBeforeImplementedInterface() throws Exception {
0567:                performTest("Simple", 59, null, "javaLangInterfaces.pass");
0568:            }
0569:
0570:            public void testEmptyFileAfterTypingImplementedInterface()
0571:                    throws Exception {
0572:                performTest(
0573:                        "Empty",
0574:                        0,
0575:                        "package test;\npublic class Test extends Object implements Cloneable",
0576:                        "cloneable.pass");
0577:            }
0578:
0579:            public void testAfterTypingImplementedInterface() throws Exception {
0580:                performTest("SimpleNoExtendsAndImplements", 33,
0581:                        "implements Cloneable", "cloneable.pass");
0582:            }
0583:
0584:            public void testAfterImplementedInterface() throws Exception {
0585:                performTest("Simple", 68, null, "cloneable.pass");
0586:            }
0587:
0588:            public void testEmptyFileAfterTypingImplementedInterfaceAndSpace()
0589:                    throws Exception {
0590:                performTest(
0591:                        "Empty",
0592:                        0,
0593:                        "package test;\npublic class Test extends Object implements Cloneable ",
0594:                        "empty.pass");
0595:            }
0596:
0597:            public void testAfterTypingImplementedInterfaceAndSpace()
0598:                    throws Exception {
0599:                performTest("SimpleNoExtendsAndImplements", 33,
0600:                        "implements Cloneable ", "empty.pass");
0601:            }
0602:
0603:            public void testAfterImplementedInterfaceAndSpace()
0604:                    throws Exception {
0605:                performTest("Simple", 68, " ", "empty.pass");
0606:            }
0607:
0608:            public void testEmptyFileAfterTypingFirstImplementedInterface()
0609:                    throws Exception {
0610:                performTest(
0611:                        "Empty",
0612:                        0,
0613:                        "package test;\npublic class Test extends Object implements Cloneable, ",
0614:                        "javaLangInterfaces.pass");
0615:            }
0616:
0617:            public void testAfterTypingFirstImplementedInterface()
0618:                    throws Exception {
0619:                performTest("SimpleNoExtendsAndImplements", 33,
0620:                        "implements Cloneable, ", "javaLangInterfaces.pass");
0621:            }
0622:
0623:            public void testAfterFirstImplementedInterface() throws Exception {
0624:                performTest("Simple", 70, null, "javaLangInterfaces.pass");
0625:            }
0626:
0627:            public void testEmptyFileTypingSecondImplementedInterface()
0628:                    throws Exception {
0629:                performTest(
0630:                        "Empty",
0631:                        0,
0632:                        "package test;\npublic class Test extends Object implements Cloneable, R",
0633:                        "javaLangInterfacesStartingWithR.pass");
0634:            }
0635:
0636:            public void testTypingSecondImplementedInterface() throws Exception {
0637:                performTest("SimpleNoExtendsAndImplements", 33,
0638:                        "implements Cloneable, R",
0639:                        "javaLangInterfacesStartingWithR.pass");
0640:            }
0641:
0642:            public void testOnSecondImplementedInterface() throws Exception {
0643:                performTest("Simple", 71, null,
0644:                        "javaLangInterfacesStartingWithR.pass");
0645:            }
0646:
0647:            public void testEmptyFileTypingClassBody() throws Exception {
0648:                performTest("Empty", 0, "package test;\npublic class Test {",
0649:                        "memberModifiersTypesAndGenElements.pass");
0650:            }
0651:
0652:            public void testInClassBody() throws Exception {
0653:                performTest("Simple", 80, null,
0654:                        "memberModifiersTypesAndGenElements2.pass");
0655:            }
0656:
0657:            public void testEmptyFileAfterTypingClassBody() throws Exception {
0658:                performTest("Empty", 0,
0659:                        "package test;\npublic class Test {\n}",
0660:                        "classModifiersWithoutPublic.pass");
0661:            }
0662:
0663:            public void testAfterClassBody() throws Exception {
0664:                performTest("Simple", 82, null,
0665:                        "classModifiersWithoutPublic.pass");
0666:            }
0667:
0668:            public void testEmptyFileAfterTypingIncompleteClassBodyAndSecondClassKeyword()
0669:                    throws Exception {
0670:                performTest("Empty", 0,
0671:                        "package test;\npublic class Test {\nclass",
0672:                        "classKeyword.pass");
0673:            }
0674:
0675:            // interface declaration tests ---------------------------------------------
0676:
0677:            public void testEmptyFileAfterTypingIntefaceName() throws Exception {
0678:                performTest("Empty", 0, "package test;\ninterface Test ",
0679:                        "extendsKeyword.pass");
0680:            }
0681:
0682:            public void testAfterTypingIntefaceName() throws Exception {
0683:                performTest("SimpleInterfaceNoExtends", 30, null,
0684:                        "extendsKeyword.pass");
0685:            }
0686:
0687:            public void testAfterIntefaceName() throws Exception {
0688:                performTest("SimpleInterface", 30, null, "extendsKeyword.pass");
0689:            }
0690:
0691:            public void testEmptyFileAfterTypingExtendsInInteface()
0692:                    throws Exception {
0693:                performTest("Empty", 0,
0694:                        "package test;\ninterface Test extends ",
0695:                        "javaLangInterfaces.pass");
0696:            }
0697:
0698:            public void testAfterTypingExtendsInInterface() throws Exception {
0699:                performTest("SimpleInterfaceNoExtends", 30, "extends ",
0700:                        "javaLangInterfaces.pass");
0701:            }
0702:
0703:            public void testAfterExtendsInInteface() throws Exception {
0704:                performTest("SimpleInterface", 38, null,
0705:                        "javaLangInterfaces.pass");
0706:            }
0707:
0708:            // enum declaration tests --------------------------------------------------
0709:
0710:            public void testEmptyFileAfterTypingEnumName() throws Exception {
0711:                performTest("Empty", 0, "package test;\npublic enum Test ",
0712:                        "implementsKeyword.pass");
0713:            }
0714:
0715:            public void testAfterTypingEnumName() throws Exception {
0716:                performTest("SimpleEnumNoImplements", 32, null,
0717:                        "implementsKeyword.pass");
0718:            }
0719:
0720:            public void testAfterEnumName() throws Exception {
0721:                performTest("SimpleEnum", 32, null, "implementsKeyword.pass");
0722:            }
0723:
0724:            public void testEmptyFileAfterTypingImplementsInEnum()
0725:                    throws Exception {
0726:                performTest("Empty", 0,
0727:                        "package test;\npublic enum Test implements ",
0728:                        "javaLangInterfaces.pass");
0729:            }
0730:
0731:            public void testAfterTypingImplementsInEnum() throws Exception {
0732:                performTest("SimpleEnumNoImplements", 43, null,
0733:                        "javaLangInterfaces.pass");
0734:            }
0735:
0736:            public void testAfterImplementsInEnum() throws Exception {
0737:                performTest("SimpleEnum", 43, null, "javaLangInterfaces.pass");
0738:            }
0739:
0740:            // method declaration tests -------------------------------------------------
0741:
0742:            public void testEmptyFileTypingPublicKeywordInMethodDecl()
0743:                    throws Exception {
0744:                performTest("MethodStart", 40, "p",
0745:                        "memberModifiersStartingWithP.pass");
0746:            }
0747:
0748:            public void testOnPublicKeywordInMethodDecl() throws Exception {
0749:                performTest("Method", 41, null,
0750:                        "memberModifiersStartingWithP.pass");
0751:            }
0752:
0753:            public void testEmptyFileAfterTypingPublicKeywordInMethodDecl()
0754:                    throws Exception {
0755:                performTest("MethodStart", 40, "public", "publicKeyword.pass");
0756:            }
0757:
0758:            public void testAfterPublicKeywordInMethodDecl() throws Exception {
0759:                performTest("Method", 46, null, "publicKeyword.pass");
0760:            }
0761:
0762:            public void testTypingStaticMethodDecl() throws Exception {
0763:                performTest("Method", 46, " sta", "staticKeyword.pass");
0764:            }
0765:
0766:            public void testAfterTypingStaticMethodDecl() throws Exception {
0767:                performTest("Method", 46, " static", "staticKeyword.pass");
0768:            }
0769:
0770:            public void testEmptyFileBeforeTypingReturnValue() throws Exception {
0771:                performTest("MethodStart", 40, "public ",
0772:                        "memberModifiersAndTypesWithoutPublic.pass");
0773:            }
0774:
0775:            public void testBeforeReturnValue() throws Exception {
0776:                performTest("Method", 47, null,
0777:                        "memberModifiersAndTypesWithoutPublic.pass");
0778:            }
0779:
0780:            public void testEmptyFileTypingReturnValue() throws Exception {
0781:                performTest("MethodStart", 40, "public voi", "voidKeyword.pass");
0782:            }
0783:
0784:            public void testOnReturnValue() throws Exception {
0785:                performTest("Method", 50, null, "voidKeyword.pass");
0786:            }
0787:
0788:            public void testEmptyFileAfterTypingReturnValue() throws Exception {
0789:                performTest("MethodStart", 40, "public void",
0790:                        "voidKeyword.pass");
0791:            }
0792:
0793:            public void testAfterReturnValue() throws Exception {
0794:                performTest("Method", 51, null, "voidKeyword.pass");
0795:            }
0796:
0797:            public void testEmptyFileBeforeTypingMethodName() throws Exception {
0798:                performTest("MethodStart", 40, "public void ", "empty.pass");
0799:            }
0800:
0801:            public void testBeforeMethodName() throws Exception {
0802:                performTest("Method", 52, null, "empty.pass");
0803:            }
0804:
0805:            public void testEmptyFileTypingMethodName() throws Exception {
0806:                performTest("MethodStart", 40, "public void o", "empty.pass");
0807:            }
0808:
0809:            public void testOnMethodName() throws Exception {
0810:                performTest("Method", 53, null, "empty.pass");
0811:            }
0812:
0813:            public void testEmptyFileAfterTypingMethodName() throws Exception {
0814:                performTest("MethodStart", 40, "public void op", "empty.pass");
0815:            }
0816:
0817:            public void testAfterMethodName() throws Exception {
0818:                performTest("Method", 54, null, "empty.pass");
0819:            }
0820:
0821:            public void testEmptyFileBeforeTypingFirstParameter()
0822:                    throws Exception {
0823:                performTest("MethodStart", 40, "public void op(",
0824:                        "parameterTypes.pass");
0825:            }
0826:
0827:            public void testBeforeTypingFirstParameter() throws Exception {
0828:                performTest("MethodNoParamsAndThrows", 55, null,
0829:                        "parameterTypes.pass");
0830:            }
0831:
0832:            public void testBeforeFirstParameter() throws Exception {
0833:                performTest("Method", 55, null, "parameterTypes.pass");
0834:            }
0835:
0836:            public void testEmptyFileTypingFirstParameterType()
0837:                    throws Exception {
0838:                performTest("MethodStart", 40, "public void op(i",
0839:                        "intKeyword.pass");
0840:            }
0841:
0842:            public void testTypingFirstParameterType() throws Exception {
0843:                performTest("MethodNoParamsAndThrows", 55, "i",
0844:                        "intKeyword.pass");
0845:            }
0846:
0847:            public void testOnFirstParameterType() throws Exception {
0848:                performTest("Method", 56, null, "intKeyword.pass");
0849:            }
0850:
0851:            public void testEmptyFileAfterTypingFirstParameterType()
0852:                    throws Exception {
0853:                performTest("MethodStart", 40, "public void op(int",
0854:                        "intKeyword.pass");
0855:            }
0856:
0857:            public void testAfterTypingFirstParameterType() throws Exception {
0858:                performTest("MethodNoParamsAndThrows", 55, "int",
0859:                        "intKeyword.pass");
0860:            }
0861:
0862:            public void testAfterFirstParameterType() throws Exception {
0863:                performTest("Method", 58, null, "intKeyword.pass");
0864:            }
0865:
0866:            public void testEmptyFileBeforeTypingFirstParameterName()
0867:                    throws Exception {
0868:                performTest("MethodStart", 40, "public void op(int ",
0869:                        "intVarName.pass");
0870:            }
0871:
0872:            public void testBeforeTypingFirstParameterName() throws Exception {
0873:                performTest("MethodNoParamsAndThrows", 55, "int ",
0874:                        "intVarName.pass");
0875:            }
0876:
0877:            public void testBeforeFirstParameterName() throws Exception {
0878:                performTest("Method", 59, null, "intVarName.pass");
0879:            }
0880:
0881:            public void testEmptyFileTypingFirstParameterName()
0882:                    throws Exception {
0883:                performTest("MethodStart", 40, "public void op(int a",
0884:                        "aI.pass");
0885:            }
0886:
0887:            public void testTypingFirstParameterName() throws Exception {
0888:                performTest("MethodNoParamsAndThrows", 55, "int a", "aI.pass");
0889:            }
0890:
0891:            public void testOnFirstParameterName() throws Exception {
0892:                performTest("Method", 60, null, "aI.pass");
0893:            }
0894:
0895:            public void testEmptyFileAfterTypingFirstParameterNameAndSpace()
0896:                    throws Exception {
0897:                performTest("MethodStart", 40, "public void op(int a ",
0898:                        "empty.pass");
0899:            }
0900:
0901:            public void testAfterTypingFirstParameterNameAndSpace()
0902:                    throws Exception {
0903:                performTest("MethodNoParamsAndThrows", 55, "int a ",
0904:                        "empty.pass");
0905:            }
0906:
0907:            public void testAfterFirstParameterNameAndSpace() throws Exception {
0908:                performTest("Method", 60, " ", "empty.pass");
0909:            }
0910:
0911:            public void testEmptyFileBeforeTypingSecondParameter()
0912:                    throws Exception {
0913:                performTest("MethodStart", 40, "public void op(int a,",
0914:                        "parameterTypes.pass");
0915:            }
0916:
0917:            public void testBeforeTypingSecondParameter() throws Exception {
0918:                performTest("MethodNoParamsAndThrows", 55, "int a,",
0919:                        "parameterTypes.pass");
0920:            }
0921:
0922:            public void testBeforeSecondParameter() throws Exception {
0923:                performTest("Method", 61, null, "parameterTypes.pass");
0924:            }
0925:
0926:            public void testEmptyFileTypingSecondParameterType()
0927:                    throws Exception {
0928:                performTest("MethodStart", 40, "public void op(int a, bo",
0929:                        "booleanKeyword.pass");
0930:            }
0931:
0932:            public void testTypingSecondParameterType() throws Exception {
0933:                performTest("MethodNoParamsAndThrows", 55, "int a, bo",
0934:                        "booleanKeyword.pass");
0935:            }
0936:
0937:            public void testOnSecondParameterType() throws Exception {
0938:                performTest("Method", 64, null, "booleanKeyword.pass");
0939:            }
0940:
0941:            public void testEmptyFileAfterTypingSecondParameterType()
0942:                    throws Exception {
0943:                performTest("MethodStart", 40, "public void op(int a, boolean",
0944:                        "booleanKeyword.pass");
0945:            }
0946:
0947:            public void testAfterTypingSecondParameterType() throws Exception {
0948:                performTest("MethodNoParamsAndThrows", 55, "int a, boolean",
0949:                        "booleanKeyword.pass");
0950:            }
0951:
0952:            public void testAfterSecondParameterType() throws Exception {
0953:                performTest("Method", 69, null, "booleanKeyword.pass");
0954:            }
0955:
0956:            public void testEmptyFileBeforeTypingSecondParameterName()
0957:                    throws Exception {
0958:                performTest("MethodStart", 40,
0959:                        "public void op(int a, boolean ", "booleanVarName.pass");
0960:            }
0961:
0962:            public void testBeforeTypingSecondParameterName() throws Exception {
0963:                performTest("MethodNoParamsAndThrows", 55, "int a, boolean ",
0964:                        "booleanVarName.pass");
0965:            }
0966:
0967:            public void testBeforeSecondParameterName() throws Exception {
0968:                performTest("Method", 70, null, "booleanVarName.pass");
0969:            }
0970:
0971:            public void testEmptyFileTypingSecondParameterName()
0972:                    throws Exception {
0973:                performTest("MethodStart", 40,
0974:                        "public void op(int a, boolean b",
0975:                        "booleanVarName.pass");
0976:            }
0977:
0978:            public void testTypingSecondParameterName() throws Exception {
0979:                performTest("MethodNoParamsAndThrows", 55, "int a, boolean b",
0980:                        "booleanVarName.pass");
0981:            }
0982:
0983:            public void testOnSecondParameterName() throws Exception {
0984:                performTest("Method", 71, null, "booleanVarName.pass");
0985:            }
0986:
0987:            public void testEmptyFileBeforeTypingThrowsKeyword()
0988:                    throws Exception {
0989:                performTest("MethodStart", 40, "public void op() ",
0990:                        "throwsKeyword.pass");
0991:            }
0992:
0993:            public void testBeforeTypingThrowsKeyword() throws Exception {
0994:                performTest("MethodNoParamsAndThrows", 56, " ",
0995:                        "throwsKeyword.pass");
0996:            }
0997:
0998:            public void testBeforeThrowsKeyword() throws Exception {
0999:                performTest("Method", 73, null, "throwsKeyword.pass");
1000:            }
1001:
1002:            public void testEmptyFileTypingThrowsKeyword() throws Exception {
1003:                performTest("MethodStart", 40, "public void op() t",
1004:                        "throwsKeyword.pass");
1005:            }
1006:
1007:            public void testTypingThrowsKeyword() throws Exception {
1008:                performTest("MethodNoParamsAndThrows", 56, " t",
1009:                        "throwsKeyword.pass");
1010:            }
1011:
1012:            public void testOnThrowsKeyword() throws Exception {
1013:                performTest("Method", 74, null, "throwsKeyword.pass");
1014:            }
1015:
1016:            public void testEmptyAfterFileTypingThrowsKeyword()
1017:                    throws Exception {
1018:                performTest("MethodStart", 40, "public void op() throws",
1019:                        "throwsKeyword.pass");
1020:            }
1021:
1022:            public void testAfterTypingThrowsKeyword() throws Exception {
1023:                performTest("MethodNoParamsAndThrows", 56, " throws",
1024:                        "throwsKeyword.pass");
1025:            }
1026:
1027:            public void testAfterThrowsKeyword() throws Exception {
1028:                performTest("Method", 79, null, "throwsKeyword.pass");
1029:            }
1030:
1031:            public void testEmptyFileBeforeTypingThrownException()
1032:                    throws Exception {
1033:                performTest("MethodStart", 40, "public void op() throws ",
1034:                        "javaLangThrowables.pass");
1035:            }
1036:
1037:            public void testBeforeTypingThrownException() throws Exception {
1038:                performTest("MethodNoParamsAndThrows", 56, "throws ",
1039:                        "javaLangThrowables.pass");
1040:            }
1041:
1042:            public void testBeforeThrownException() throws Exception {
1043:                performTest("Method", 80, null, "javaLangThrowables.pass");
1044:            }
1045:
1046:            public void testEmptyFileTypingThrownException() throws Exception {
1047:                performTest("MethodStart", 40, "public void op() throws N",
1048:                        "javaLangThrowablesStartingWithN.pass");
1049:            }
1050:
1051:            public void testTypingThrownException() throws Exception {
1052:                performTest("MethodNoParamsAndThrows", 56, "throws N",
1053:                        "javaLangThrowablesStartingWithN.pass");
1054:            }
1055:
1056:            public void testOnThrownException() throws Exception {
1057:                performTest("Method", 81, null,
1058:                        "javaLangThrowablesStartingWithN.pass");
1059:            }
1060:
1061:            public void testEmptyFileAfterTypingThrownException()
1062:                    throws Exception {
1063:                performTest("MethodStart", 40,
1064:                        "public void op() throws NullPointerException",
1065:                        "nullPointerException.pass");
1066:            }
1067:
1068:            public void testAfterTypingThrownException() throws Exception {
1069:                performTest("MethodNoParamsAndThrows", 56,
1070:                        "throws NullPointerException",
1071:                        "nullPointerException.pass");
1072:            }
1073:
1074:            public void testAfterThrownException() throws Exception {
1075:                performTest("Method", 100, null, "nullPointerException.pass");
1076:            }
1077:
1078:            public void testEmptyFileAfterTypingThrownExceptionAndSpace()
1079:                    throws Exception {
1080:                performTest("MethodStart", 40,
1081:                        "public void op() throws NullPointerException ",
1082:                        "empty.pass");
1083:            }
1084:
1085:            public void testAfterTypingThrownExceptionAndSpace()
1086:                    throws Exception {
1087:                performTest("MethodNoParamsAndThrows", 56,
1088:                        "throws NullPointerException ", "empty.pass");
1089:            }
1090:
1091:            public void testAfterThrownExceptionAndSpace() throws Exception {
1092:                performTest("Method", 100, " ", "empty.pass");
1093:            }
1094:
1095:            public void testEmptyFileBeforeTypingSecondThrownException()
1096:                    throws Exception {
1097:                performTest("MethodStart", 40,
1098:                        "public void op() throws NullPointerException, ",
1099:                        "javaLangThrowables.pass");
1100:            }
1101:
1102:            public void testBeforeTypingSecondThrownException()
1103:                    throws Exception {
1104:                performTest("MethodNoParamsAndThrows", 56,
1105:                        "throws NullPointerException, ",
1106:                        "javaLangThrowables.pass");
1107:            }
1108:
1109:            public void testBeforeSecondThrownExceptionAndSpace()
1110:                    throws Exception {
1111:                performTest("Method", 102, null, "javaLangThrowables.pass");
1112:            }
1113:
1114:            public void testEmptyFileTypingSecondThrownException()
1115:                    throws Exception {
1116:                performTest("MethodStart", 40,
1117:                        "public void op() throws NullPointerException, I",
1118:                        "javaLangThrowablesStartingWithI.pass");
1119:            }
1120:
1121:            public void testTypingSecondThrownException() throws Exception {
1122:                performTest("MethodNoParamsAndThrows", 56,
1123:                        "throws NullPointerException, I",
1124:                        "javaLangThrowablesStartingWithI.pass");
1125:            }
1126:
1127:            public void testOnSecondThrownException() throws Exception {
1128:                performTest("Method", 103, null,
1129:                        "javaLangThrowablesStartingWithI.pass");
1130:            }
1131:
1132:            public void testEmptyFileAfterTypingMethodBody() throws Exception {
1133:                performTest("MethodStart", 40, "public void op() {\n}",
1134:                        "memberModifiersTypesAndGenElements.pass");
1135:            }
1136:
1137:            public void testAfterMethodBody() throws Exception {
1138:                performTest("Method", 131, null,
1139:                        "memberModifiersTypesAndGenElements.pass");
1140:            }
1141:
1142:            public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeyword()
1143:                    throws Exception {
1144:                performTest("MethodStart", 40, "public void op() {\npublic",
1145:                        "empty.pass");
1146:            }
1147:
1148:            public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeywordAndSpace()
1149:                    throws Exception {
1150:                performTest("MethodStart", 40, "public void op() {\npublic ",
1151:                        "memberModifiersAndTypesWithoutPublic.pass");
1152:            }
1153:
1154:            // field declaration tests -------------------------------------------------
1155:
1156:            public void testEmptyFileAfterTypingFieldNameAndSpace()
1157:                    throws Exception {
1158:                performTest("MethodStart", 40, "public int field ",
1159:                        "empty.pass");
1160:            }
1161:
1162:            public void testAfterTypingFieldNameAndSpace() throws Exception {
1163:                performTest("FieldNoInit", 56, " ", "empty.pass");
1164:            }
1165:
1166:            public void testAfterFieldNameAndSpace() throws Exception {
1167:                performTest("Field", 57, null, "empty.pass");
1168:            }
1169:
1170:            public void testEmptyFileAfterTypingAssignmentInField()
1171:                    throws Exception {
1172:                performTest(
1173:                        "MethodStart",
1174:                        40,
1175:                        "public static int staticField = 10;\npublic int field =",
1176:                        "typesLocalMembersAndSmartInt.pass");
1177:            }
1178:
1179:            public void testAfterTypingAssignmentInField() throws Exception {
1180:                performTest("FieldNoInit", 56, " =",
1181:                        "typesLocalMembersAndSmartInt.pass");
1182:            }
1183:
1184:            public void testAfterAssignmentInField() throws Exception {
1185:                performTest("Field", 58, null,
1186:                        "typesLocalMembersAndSmartInt.pass");
1187:            }
1188:
1189:            public void testEmptyFileBeforeTypingInitOfField() throws Exception {
1190:                performTest(
1191:                        "MethodStart",
1192:                        40,
1193:                        "public static int staticField = 10;\npublic int field = ",
1194:                        "typesLocalMembersAndSmartInt.pass");
1195:            }
1196:
1197:            public void testBeforeTypingInitOfField() throws Exception {
1198:                performTest("FieldNoInit", 56, " = ",
1199:                        "typesLocalMembersAndSmartInt.pass");
1200:            }
1201:
1202:            public void testBeforeInitOfField() throws Exception {
1203:                performTest("Field", 59, null,
1204:                        "typesLocalMembersAndSmartInt.pass");
1205:            }
1206:
1207:            public void testEmptyFileBeforeTypingInitOfStaticField()
1208:                    throws Exception {
1209:                performTest("MethodStart", 40,
1210:                        "public static int staticField = ",
1211:                        "typesAndStaticLocalMembers.pass");
1212:            }
1213:
1214:            public void testBeforeTypingInitOfStaticField() throws Exception {
1215:                performTest("FieldNoInit", 91, " = ",
1216:                        "typesAndStaticLocalMembers.pass");
1217:            }
1218:
1219:            public void testBeforeInitOfStaticField() throws Exception {
1220:                performTest("Field", 112, null,
1221:                        "typesAndStaticLocalMembers.pass");
1222:            }
1223:
1224:            public void testEmptyFileTypingInitOfField() throws Exception {
1225:                performTest("MethodStart", 40, "public int field = ha",
1226:                        "hashCode.pass");
1227:            }
1228:
1229:            public void testTypingInitOfField() throws Exception {
1230:                performTest("FieldNoInit", 56, " = ha", "hashCode.pass");
1231:            }
1232:
1233:            public void testOnInitOfField() throws Exception {
1234:                performTest("Field", 61, null, "hashCode.pass");
1235:            }
1236:
1237:            public void testEmptyFileTypingMethodInvocationWithinInitOfField()
1238:                    throws Exception {
1239:                performTest(
1240:                        "MethodStart",
1241:                        40,
1242:                        "public static int staticField = 10;\npublic int field = hashCode(",
1243:                        "typesAndLocalMembers.pass");
1244:            }
1245:
1246:            public void testTypingMethodInvocationWithinInitOfField()
1247:                    throws Exception {
1248:                performTest("FieldNoInit", 56, " = hashCode(",
1249:                        "typesAndLocalMembers.pass");
1250:            }
1251:
1252:            public void testOnMethodInvocationWithinInitOfField()
1253:                    throws Exception {
1254:                performTest("Field", 68, null, "typesAndLocalMembers.pass");
1255:            }
1256:
1257:            public void testEmptyFileAfterTypingMethodInvocationWithinInitOfField()
1258:                    throws Exception {
1259:                performTest("MethodStart", 40, "public int field = hashCode()",
1260:                        "empty.pass");
1261:            }
1262:
1263:            public void testAfterTypingMethodInvocationWithinInitOfField()
1264:                    throws Exception {
1265:                performTest("FieldNoInit", 56, " = hashCode()", "empty.pass");
1266:            }
1267:
1268:            public void testAfterMethodInvocationWithinInitOfField()
1269:                    throws Exception {
1270:                performTest("Field", 69, null, "empty.pass");
1271:            }
1272:
1273:            public void testEmptyFileAfterTypingOperatorWithinInitOfField()
1274:                    throws Exception {
1275:                performTest(
1276:                        "MethodStart",
1277:                        40,
1278:                        "public static int staticField = 10;\npublic int field = hashCode() /",
1279:                        "typesLocalMembersAndSmartPrimitives.pass");
1280:            }
1281:
1282:            public void testAfterTypingOperatorWithinInitOfField()
1283:                    throws Exception {
1284:                performTest("FieldNoInit", 56, " = hashCode() /",
1285:                        "typesLocalMembersAndSmartPrimitives.pass");
1286:            }
1287:
1288:            public void testAfterOperatorWithinInitOfField() throws Exception {
1289:                performTest("Field", 71, null,
1290:                        "typesLocalMembersAndSmartPrimitives.pass");
1291:            }
1292:
1293:            public void testEmptyFileAfterTypingConstantWithinInitOfField()
1294:                    throws Exception {
1295:                performTest("MethodStart", 40,
1296:                        "public int field = hashCode() / 10", "empty.pass");
1297:            }
1298:
1299:            public void testAfterTypingConstantWithinInitOfField()
1300:                    throws Exception {
1301:                performTest("FieldNoInit", 56, " = hashCode() / 10",
1302:                        "empty.pass");
1303:            }
1304:
1305:            public void testAfterConstantWithinInitOfField() throws Exception {
1306:                performTest("Field", 74, null, "empty.pass");
1307:            }
1308:
1309:            public void testEmptyFileAfterTypingFieldDeclaration()
1310:                    throws Exception {
1311:                performTest("MethodStart", 40,
1312:                        "public int field = hashCode() / 10;",
1313:                        "memberModifiersTypesAndGenElements3.pass");
1314:            }
1315:
1316:            public void testAfterFieldDeclaration() throws Exception {
1317:                performTest("Field", 75, null,
1318:                        "memberModifiersTypesAndGenElements4.pass");
1319:            }
1320:
1321:            public void testTypingStaticFieldAfterErrorInPreviousFieldDeclaration()
1322:                    throws Exception {
1323:                performTest("MethodStart", 40, "public int \npublic sta",
1324:                        "staticKeyword.pass");
1325:            }
1326:
1327:            public void testTypingStaticFieldAfterErrorInPreviousFieldInitialization()
1328:                    throws Exception {
1329:                performTest("MethodStart", 40,
1330:                        "public int field = has\npublic sta",
1331:                        "staticKeyword.pass");
1332:            }
1333:
1334:            // basic method body tests -------------------------------------------------
1335:
1336:            public void testEmptyFileTypingMethodBody() throws Exception {
1337:                performTest("SimpleMethodBodyStart", 89, null,
1338:                        "methodBodyContent.pass");
1339:            }
1340:
1341:            public void testTypingMethodBody() throws Exception {
1342:                performTest("SimpleEmptyMethodBody", 89, null,
1343:                        "methodBodyContent.pass");
1344:            }
1345:
1346:            public void testInMethodBody() throws Exception {
1347:                performTest("SimpleMethodBody", 89, null,
1348:                        "methodBodyContent.pass");
1349:            }
1350:
1351:            public void testEmptyFileTypingLocalVariableTypeInMethodBody()
1352:                    throws Exception {
1353:                performTest("SimpleMethodBodyStart", 98, "bo",
1354:                        "booleanKeyword.pass");
1355:            }
1356:
1357:            public void testTypingLocalVariableTypeInMethodBody()
1358:                    throws Exception {
1359:                performTest("SimpleEmptyMethodBody", 98, "bo",
1360:                        "booleanKeyword.pass");
1361:            }
1362:
1363:            public void testLocalVariableTypeInMethodBody() throws Exception {
1364:                performTest("SimpleMethodBody", 100, null,
1365:                        "booleanKeyword.pass");
1366:            }
1367:
1368:            public void testEmptyFileAfterTypingLocalVariableTypeInMethodBody()
1369:                    throws Exception {
1370:                performTest("SimpleMethodBodyStart", 98, "boolean",
1371:                        "booleanKeyword.pass");
1372:            }
1373:
1374:            public void testAfterTypingLocalVariableTypeInMethodBody()
1375:                    throws Exception {
1376:                performTest("SimpleEmptyMethodBody", 98, "boolean",
1377:                        "booleanKeyword.pass");
1378:            }
1379:
1380:            public void testAfterLocalVariableTypeInMethodBody()
1381:                    throws Exception {
1382:                performTest("SimpleMethodBody", 105, null,
1383:                        "booleanKeyword.pass");
1384:            }
1385:
1386:            public void testEmptyFileBeforeTypingLocalVariableNameInMethodBody()
1387:                    throws Exception {
1388:                performTest("SimpleMethodBodyStart", 98, "boolean ",
1389:                        "booleanVarName.pass");
1390:            }
1391:
1392:            public void testBeforeTypingLocalVariableNameInMethodBody()
1393:                    throws Exception {
1394:                performTest("SimpleEmptyMethodBody", 98, "boolean ",
1395:                        "booleanVarName.pass");
1396:            }
1397:
1398:            public void testBeforeLocalVariableNameInMethodBody()
1399:                    throws Exception {
1400:                performTest("SimpleMethodBody", 106, null,
1401:                        "booleanVarName.pass");
1402:            }
1403:
1404:            public void testEmptyFileTypingLocalVariableNameInMethodBody()
1405:                    throws Exception {
1406:                performTest("SimpleMethodBodyStart", 98, "boolean b",
1407:                        "booleanVarName.pass");
1408:            }
1409:
1410:            public void testTypingLocalVariableNameInMethodBody()
1411:                    throws Exception {
1412:                performTest("SimpleEmptyMethodBody", 98, "boolean b",
1413:                        "booleanVarName.pass");
1414:            }
1415:
1416:            public void testOnLocalVariableNameInMethodBody() throws Exception {
1417:                performTest("SimpleMethodBody", 107, null,
1418:                        "booleanVarName.pass");
1419:            }
1420:
1421:            public void testEmptyFileAfterTypingLocalVariableNameAndSpaceInMethodBody()
1422:                    throws Exception {
1423:                performTest("SimpleMethodBodyStart", 98, "boolean b ",
1424:                        "empty.pass");
1425:            }
1426:
1427:            public void testAfterTypingLocalVariableNameAndSpaceInMethodBody()
1428:                    throws Exception {
1429:                performTest("SimpleEmptyMethodBody", 98, "boolean b ",
1430:                        "empty.pass");
1431:            }
1432:
1433:            public void testAfterLocalVariableNameAndSpaceInMethodBody()
1434:                    throws Exception {
1435:                performTest("SimpleMethodBody", 107, " ", "empty.pass");
1436:            }
1437:
1438:            public void testEmptyFileAfterTypingLocalVariableInMethodBody()
1439:                    throws Exception {
1440:                performTest("SimpleMethodBodyStart", 98, "boolean b;",
1441:                        "methodBodyContentAndLocalVar.pass");
1442:            }
1443:
1444:            public void testAfterTypingLocalVariableInMethodBody()
1445:                    throws Exception {
1446:                performTest("SimpleEmptyMethodBody", 98, "boolean b;",
1447:                        "methodBodyContentAndLocalVar.pass");
1448:            }
1449:
1450:            public void testAfterLocalVariableInMethodBody() throws Exception {
1451:                performTest("SimpleMethodBody", 108, null,
1452:                        "methodBodyContentAndLocalVar.pass");
1453:            }
1454:
1455:            public void testEmptyFileTypingTypeInMethodBody() throws Exception {
1456:                performTest("SimpleMethodBodyStart", 98, "Sy", "system.pass");
1457:            }
1458:
1459:            public void testTypingTypeInMethodBody() throws Exception {
1460:                performTest("SimpleEmptyMethodBody", 98, "Sy", "system.pass");
1461:            }
1462:
1463:            public void testTypeInMethodBody() throws Exception {
1464:                performTest("SimpleMethodBody", 112, null, "system.pass");
1465:            }
1466:
1467:            public void testEmptyFileAfterTypingTypeInMethodBody()
1468:                    throws Exception {
1469:                performTest("SimpleMethodBodyStart", 98, "System",
1470:                        "system.pass");
1471:            }
1472:
1473:            public void testAfterTypingTypeInMethodBody() throws Exception {
1474:                performTest("SimpleEmptyMethodBody", 98, "System",
1475:                        "system.pass");
1476:            }
1477:
1478:            public void testAfterTypeInMethodBody() throws Exception {
1479:                performTest("SimpleMethodBody", 116, null, "system.pass");
1480:            }
1481:
1482:            public void testEmptyFileAfterTypingTypeAndDotInMethodBody()
1483:                    throws Exception {
1484:                performTest("SimpleMethodBodyStart", 98, "System.",
1485:                        "systemContent.pass");
1486:            }
1487:
1488:            public void testAfterTypingTypeAndDotInMethodBody()
1489:                    throws Exception {
1490:                performTest("SimpleEmptyMethodBody", 98, "System.",
1491:                        "systemContent.pass");
1492:            }
1493:
1494:            public void testAfterTypeAndDotInMethodBody() throws Exception {
1495:                performTest("SimpleMethodBody", 117, null, "systemContent.pass");
1496:            }
1497:
1498:            public void testEmptyFileTypingFieldAccessInMethodBody()
1499:                    throws Exception {
1500:                performTest("SimpleMethodBodyStart", 98, "System.o",
1501:                        "systemOut.pass");
1502:            }
1503:
1504:            public void testTypingFieldAccessInMethodBody() throws Exception {
1505:                performTest("SimpleEmptyMethodBody", 98, "System.o",
1506:                        "systemOut.pass");
1507:            }
1508:
1509:            public void testFieldAccessInMethodBody() throws Exception {
1510:                performTest("SimpleMethodBody", 118, null, "systemOut.pass");
1511:            }
1512:
1513:            public void testEmptyFileAfterTypingFieldAccessInMethodBody()
1514:                    throws Exception {
1515:                performTest("SimpleMethodBodyStart", 98, "System.out",
1516:                        "systemOut.pass");
1517:            }
1518:
1519:            public void testAfterTypingFieldAccessInMethodBody()
1520:                    throws Exception {
1521:                performTest("SimpleEmptyMethodBody", 98, "System.out",
1522:                        "systemOut.pass");
1523:            }
1524:
1525:            public void testAfterFieldAccessInMethodBody() throws Exception {
1526:                performTest("SimpleMethodBody", 120, null, "systemOut.pass");
1527:            }
1528:
1529:            public void testEmptyFileAfterTypingFieldAccessAndSpaceInMethodBody()
1530:                    throws Exception {
1531:                performTest("SimpleMethodBodyStart", 98, "System.out ",
1532:                        "instanceOf.pass");
1533:            }
1534:
1535:            public void testAfterTypingFieldAccessAndSpaceInMethodBody()
1536:                    throws Exception {
1537:                performTest("SimpleEmptyMethodBody", 98, "System.out ",
1538:                        "instanceOf.pass");
1539:            }
1540:
1541:            public void testAfterFieldAccessAndSpaceInMethodBody()
1542:                    throws Exception {
1543:                performTest("SimpleMethodBody", 120, " ", "instanceOf.pass");
1544:            }
1545:
1546:            public void testEmptyFileAfterTypingFieldAccessAndDotInMethodBody()
1547:                    throws Exception {
1548:                performTest("SimpleMethodBodyStart", 98, "System.out.",
1549:                        "systemOutContent.pass");
1550:            }
1551:
1552:            public void testAfterTypingFieldAccessAndDotInMethodBody()
1553:                    throws Exception {
1554:                performTest("SimpleEmptyMethodBody", 98, "System.out.",
1555:                        "systemOutContent.pass");
1556:            }
1557:
1558:            public void testAfterFieldAccessAndDotInMethodBody()
1559:                    throws Exception {
1560:                performTest("SimpleMethodBody", 121, null,
1561:                        "systemOutContent.pass");
1562:            }
1563:
1564:            public void testEmptyFileTypingMethodInvocationInMethodBody()
1565:                    throws Exception {
1566:                performTest("SimpleMethodBodyStart", 98,
1567:                        "boolean b;\nSystem.out.println(",
1568:                        "typesLocalMembersVarsAndSmarts.pass");
1569:            }
1570:
1571:            public void testTypingMethodInvocationInMethodBody()
1572:                    throws Exception {
1573:                performTest("SimpleEmptyMethodBody", 98,
1574:                        "boolean b;\nSystem.out.println(",
1575:                        "typesLocalMembersVarsAndSmarts.pass");
1576:            }
1577:
1578:            public void testMethodInvocationInMethodBody() throws Exception {
1579:                performTest("SimpleMethodBody", 129, null,
1580:                        "typesLocalMembersVarsAndSmarts.pass");
1581:            }
1582:
1583:            public void testEmptyFileTypingMethodInvocationParameterInMethodBody()
1584:                    throws Exception {
1585:                performTest("SimpleMethodBodyStart", 98,
1586:                        "boolean b;\nSystem.out.println(b",
1587:                        "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1588:            }
1589:
1590:            public void testTypingMethodInvocationParameterInMethodBody()
1591:                    throws Exception {
1592:                performTest("SimpleEmptyMethodBody", 98,
1593:                        "boolean b;\nSystem.out.println(b",
1594:                        "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1595:            }
1596:
1597:            public void testOnMethodInvocationParameterInMethodBody()
1598:                    throws Exception {
1599:                performTest("SimpleMethodBody", 130, null,
1600:                        "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1601:            }
1602:
1603:            public void testEmptyFileTypingMethodInvocationParameterAndSpaceInMethodBody()
1604:                    throws Exception {
1605:                performTest("SimpleMethodBodyStart", 98,
1606:                        "System.out.println(b ", "empty.pass");
1607:            }
1608:
1609:            public void testTypingMethodInvocationParameterAndSpaceInMethodBody()
1610:                    throws Exception {
1611:                performTest("SimpleEmptyMethodBody", 98,
1612:                        "System.out.println(b ", "empty.pass");
1613:            }
1614:
1615:            public void testAfterMethodInvocationParameterAndSpaceInMethodBody()
1616:                    throws Exception {
1617:                performTest("SimpleMethodBody", 130, " ", "empty.pass");
1618:            }
1619:
1620:            public void testEmptyFileBeforeTypingSecondMethodInvocationParameterInMethodBody()
1621:                    throws Exception {
1622:                performTest("SimpleMethodBodyStart", 98,
1623:                        "boolean b;\nSystem.out.println(b, ",
1624:                        "typesLocalMembersAndVars.pass");
1625:            }
1626:
1627:            public void testBeforeTypingSecondMethodInvocationParameterInMethodBody()
1628:                    throws Exception {
1629:                performTest("SimpleEmptyMethodBody", 98,
1630:                        "boolean b;\nSystem.out.println(b, ",
1631:                        "typesLocalMembersAndVars.pass");
1632:            }
1633:
1634:            public void testBeforeSecondMethodInvocationParameterInMethodBody()
1635:                    throws Exception {
1636:                performTest("SimpleMethodBody", 130, ", ",
1637:                        "typesLocalMembersAndVars.pass");
1638:            }
1639:
1640:            public void testEmptyFileTypingSecondMethodInvocationParameterInMethodBody()
1641:                    throws Exception {
1642:                performTest("SimpleMethodBodyStart", 98,
1643:                        "boolean b;\nSystem.out.println(b, b",
1644:                        "typesLocalMembersAndVarsStartingWithB.pass");
1645:            }
1646:
1647:            public void testTypingSecondMethodInvocationParameterInMethodBody()
1648:                    throws Exception {
1649:                performTest("SimpleEmptyMethodBody", 98,
1650:                        "boolean b;\nSystem.out.println(b, b",
1651:                        "typesLocalMembersAndVarsStartingWithB.pass");
1652:            }
1653:
1654:            public void testOnSecondMethodInvocationParameterInMethodBody()
1655:                    throws Exception {
1656:                performTest("SimpleMethodBody", 130, ", b",
1657:                        "typesLocalMembersAndVarsStartingWithB.pass");
1658:            }
1659:
1660:            public void testEmptyFileAfterTypingMethodInvocationParametersInMethodBody()
1661:                    throws Exception {
1662:                performTest("SimpleMethodBodyStart", 98,
1663:                        "boolean b;\nSystem.out.println(b)", "empty.pass");
1664:            }
1665:
1666:            public void testAfterTypingMethodInvocationParametersInMethodBody()
1667:                    throws Exception {
1668:                performTest("SimpleEmptyMethodBody", 98,
1669:                        "boolean b;\nSystem.out.println(b)", "empty.pass");
1670:            }
1671:
1672:            public void testAfteMethodInvocationParametersInMethodBody()
1673:                    throws Exception {
1674:                performTest("SimpleMethodBody", 131, null, "empty.pass");
1675:            }
1676:
1677:            public void testEmptyFileAfterTypingMethodInvocationParametersAndSpaceInMethodBody()
1678:                    throws Exception {
1679:                performTest("SimpleMethodBodyStart", 98,
1680:                        "boolean b;\nSystem.out.println(b) ", "empty.pass");
1681:            }
1682:
1683:            public void testAfterTypingMethodInvocationParametersAndSpaceInMethodBody()
1684:                    throws Exception {
1685:                performTest("SimpleEmptyMethodBody", 98,
1686:                        "boolean b;\nSystem.out.println(b) ", "empty.pass");
1687:            }
1688:
1689:            public void testAfteMethodInvocationParametersAndSpaceInMethodBody()
1690:                    throws Exception {
1691:                performTest("SimpleMethodBody", 131, " ", "empty.pass");
1692:            }
1693:
1694:            public void testEmptyFileAfterTypingMethodInvocationInMethodBody()
1695:                    throws Exception {
1696:                performTest("SimpleMethodBodyStart", 98,
1697:                        "boolean b;\nSystem.out.println(b);",
1698:                        "methodBodyContentAndLocalVar.pass");
1699:            }
1700:
1701:            public void testAfterTypingMethodInvocationInMethodBody()
1702:                    throws Exception {
1703:                performTest("SimpleEmptyMethodBody", 98,
1704:                        "boolean b;\nSystem.out.println(b);",
1705:                        "methodBodyContentAndLocalVar.pass");
1706:            }
1707:
1708:            public void testAfteMethodInvocationInMethodBody() throws Exception {
1709:                performTest("SimpleMethodBody", 132, null,
1710:                        "methodBodyContentAndLocalVar.pass");
1711:            }
1712:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.