KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > editor > completion > JavaCompletionProvider15FeaturesTest


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.java.editor.completion;
21
22 /**
23  *
24  * @author Dusan Balek
25  */

26 public class JavaCompletionProvider15FeaturesTest extends CompletionTestBase {
27
28     public JavaCompletionProvider15FeaturesTest(String JavaDoc testName) {
29         super(testName);
30     }
31
32     // Java 1.5 generics tests -------------------------------------------------------
33

34     public void testEmptyFileBeforeTypingFirstTypeParam() throws Exception JavaDoc {
35         performTest("GenericsStart", 32, "<", "empty.pass");
36     }
37
38     public void testBeforeTypingFirstTypeParam() throws Exception JavaDoc {
39         performTest("GenericsNoTypeParams", 32, "<", "empty.pass");
40     }
41     
42     public void testBeforeFirstTypeParam() throws Exception JavaDoc {
43         performTest("Generics", 33, null, "empty.pass");
44     }
45     
46     public void testEmptyFileTypingFirstTypeParam() throws Exception JavaDoc {
47         performTest("GenericsStart", 32, "<X", "empty.pass");
48     }
49     
50     public void testTypingFirstTypeParam() throws Exception JavaDoc {
51         performTest("GenericsNoTypeParams", 32, "<X", "empty.pass");
52     }
53     
54     public void testOnFirstTypeParam() throws Exception JavaDoc {
55         performTest("Generics", 34, null, "empty.pass");
56     }
57
58     public void testEmptyFileAfterTypingFirstTypeParamAndSpace() throws Exception JavaDoc {
59         performTest("GenericsStart", 32, "<X ", "extendsKeyword.pass");
60     }
61     
62     public void testAfterTypingFirstTypeParamAndSpace() throws Exception JavaDoc {
63         performTest("GenericsNoTypeParams", 32, "<X ", "extendsKeyword.pass");
64     }
65     
66     public void testAfterFirstTypeParamAndSpace() throws Exception JavaDoc {
67         performTest("Generics", 35, null, "extendsKeyword.pass");
68     }
69
70     public void testEmptyFileTypingExtendsInFirstTypeParam() throws Exception JavaDoc {
71         performTest("GenericsStart", 32, "<X e", "extendsKeyword.pass");
72     }
73     
74     public void testTypingExtendsInFirstTypeParam() throws Exception JavaDoc {
75         performTest("GenericsNoTypeParams", 32, "<X e", "extendsKeyword.pass");
76     }
77     
78     public void testOnExtendsInFirstTypeParam() throws Exception JavaDoc {
79         performTest("Generics", 36, null, "extendsKeyword.pass");
80     }
81
82     public void testEmptyFileAfterTypingExtendsInFirstTypeParam() throws Exception JavaDoc {
83         performTest("GenericsStart", 32, "<X extends", "extendsKeyword.pass");
84     }
85     
86     public void testAfterTypingExtendsInFirstTypeParam() throws Exception JavaDoc {
87         performTest("GenericsNoTypeParams", 32, "<X extends", "extendsKeyword.pass");
88     }
89     
90     public void testAfterExtendsInFirstTypeParam() throws Exception JavaDoc {
91         performTest("Generics", 42, null, "extendsKeyword.pass");
92     }
93
94     public void testEmptyFileAfterTypingExtendsAndSpaceInFirstTypeParam() throws Exception JavaDoc {
95         performTest("GenericsStart", 32, "<X extends ", "javaLangContent.pass");
96     }
97     
98     public void testAfterTypingExtendsAndSpaceInFirstTypeParam() throws Exception JavaDoc {
99         performTest("GenericsNoTypeParams", 32, "<X extends ", "javaLangContent.pass");
100     }
101     
102     public void testAfterExtendsAndSpaceInFirstTypeParam() throws Exception JavaDoc {
103         performTest("Generics", 43, null, "javaLangContent.pass");
104     }
105
106     public void testEmptyFileAfterTypingBoundedFirstTypeParamAndSpace() throws Exception JavaDoc {
107         performTest("GenericsStart", 32, "<X extends Number ", "empty.pass");
108     }
109     
110     public void testAfterTypingBoundedFirstTypeParamAndSpace() throws Exception JavaDoc {
111         performTest("GenericsNoTypeParams", 32, "<X extends Number ", "empty.pass");
112     }
113     
114     public void testAfterBoundedFirstTypeParamAndSpace() throws Exception JavaDoc {
115         performTest("Generics", 49, " ", "empty.pass");
116     }
117     
118     public void testEmptyFileAfterTypingFirstTypeParam() throws Exception JavaDoc {
119         performTest("GenericsStart", 32, "<X extends Number,", "empty.pass");
120     }
121     
122     public void testAfterTypingFirstTypeParam() throws Exception JavaDoc {
123         performTest("GenericsNoTypeParams", 32, "<X extends Number,", "empty.pass");
124     }
125     
126     public void testAfterFirstTypeParam() throws Exception JavaDoc {
127         performTest("Generics", 50, null, "empty.pass");
128     }
129     
130     public void testEmptyFileAfterTypingTypeParams() throws Exception JavaDoc {
131         performTest("GenericsStart", 32, "<X extends Number, Y extends RuntimeException>", "extendsAndImplementsKeywords.pass");
132     }
133     
134     public void testAfterTypingTypeParams() throws Exception JavaDoc {
135         performTest("GenericsNoTypeParams", 32, "<X extends Number, Y extends RuntimeException>", "extendsAndImplementsKeywords.pass");
136     }
137     
138     public void testAfterTypeParams() throws Exception JavaDoc {
139         performTest("Generics", 78, null, "extendsAndImplementsKeywords.pass");
140     }
141
142 }
143
Popular Tags