summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormclay2008-11-13 16:56:05 (EST)
committer sefftinge2008-11-13 16:56:05 (EST)
commit21001ce3024c887de2b3be2136be13b68c85971a (patch)
treef5211bc62cada28dcbee12a12394304e011b53f1
parent912d95cf90eba5153be5791e8a097e6e9af2b67b (diff)
downloadorg.eclipse.xtext-21001ce3024c887de2b3be2136be13b68c85971a.zip
org.eclipse.xtext-21001ce3024c887de2b3be2136be13b68c85971a.tar.gz
org.eclipse.xtext-21001ce3024c887de2b3be2136be13b68c85971a.tar.bz2
add: more tests
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java29
1 files changed, 26 insertions, 3 deletions
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java b/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
index a8a11a1..8141d2f 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
@@ -108,9 +108,32 @@ public class DefaultContentAssistProcessorTest extends AbstractUiTest
public void testComputeCompletionProposalsText() throws Exception {
Map<String, List<String>> model2ExpectedProposalTextMap = new HashMap<String, List<String>>();
- model2ExpectedProposalTextMap.put("", Arrays.asList("spielplatz "));
- model2ExpectedProposalTextMap.put("spielplatz ", Arrays.asList("0","1"));
-
+ StringBuilder modelBuilder = new StringBuilder("");
+ model2ExpectedProposalTextMap.put(modelBuilder.toString(), Arrays.asList("spielplatz "));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("spielplatz ").toString(), Arrays.asList("0","1"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("1 ").toString(), Arrays.asList("\"SpielplatzBeschreibungSTRING\"","\"SpielplatzBeschreibung\"","{"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("\"SpielplatzBeschreibung\" ").toString(), Arrays.asList("{"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("{ ").toString(), Arrays.asList("erwachsener ","familie ","spielzeug ","kind ","}"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("erwachsener ").toString(), Arrays.asList("("));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("( ").toString(), Arrays.asList("ErwachsenerNameID","ErwachsenerName"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("e1 ").toString(), Arrays.asList("0","1"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("0 ").toString(), Arrays.asList(")"));
+ modelBuilder.append(")").append("erwachsener (e2 0)");
+ model2ExpectedProposalTextMap.put(modelBuilder.append("kind ").toString(), Arrays.asList("("));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("( ").toString(), Arrays.asList("KindNameID","KindName"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("k1 ").toString(), Arrays.asList("0","1"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("0 ").toString(), Arrays.asList(")"));
+ modelBuilder.append(")").append("kind (k2 0)");
+ model2ExpectedProposalTextMap.put(modelBuilder.append("familie ").toString(), Arrays.asList("("));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("( ").toString(), Arrays.asList("keyword ","\"FamilieNameSTRING\"","FamilieNameID"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("keyword ").toString(), Arrays.asList("e1","e2"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("e1 ").toString(), Arrays.asList("e1","e2"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("").toString(), Arrays.asList("e1","e2"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("e2 ").toString(), Arrays.asList("k1","k2"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("k").toString(), Arrays.asList("k1","k2",",",")"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("1 ").toString(), Arrays.asList(",",")"));
+ model2ExpectedProposalTextMap.put(modelBuilder.append("k2 ").toString(), Arrays.asList(",",")"));
+
for (Iterator<String> iterator = model2ExpectedProposalTextMap.keySet()
.iterator(); iterator.hasNext();) {