Author: vrubezhny
Date: 2008-06-20 14:12:55 -0400 (Fri, 20 Jun 2008)
New Revision: 8881
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java
Log:
JUnit TestCase is fixed for SeamViewHyperlinkPartitioner.
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java 2008-06-20
18:08:51 UTC (rev 8880)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java 2008-06-20
18:12:55 UTC (rev 8881)
@@ -46,7 +46,6 @@
}
public void setUp() throws Exception {
- //provider = new TestProjectProvider("", null, PROJECT_NAME, makeCopy);
project =
ResourcesUtils.importProject(Platform.getBundle("org.jboss.tools.seam.ui.test"),
"/projects/TestSeamELContentAssist", new NullProgressMonitor());
project.refreshLocal(IResource.DEPTH_INFINITE, null);
}
@@ -95,8 +94,8 @@
HashMap<Object, ArrayList> recognitionTest = new HashMap<Object,
ArrayList>();
ArrayList<Region> regionList = new ArrayList<Region>();
- regionList.add(new Region(1754, 12));
- regionList.add(new Region(1809, 12));
+ regionList.add(new Region(1888, 11));
+ regionList.add(new Region(1943, 11));
recognitionTest.put("org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK",
regionList);
int counter = 0;
@@ -104,10 +103,11 @@
TestData testData = new TestData(document, i);
String[] partitionTypes = detector.getPartitionTypes(document, i);
+
boolean recognized = false;
if (partitionTypes != null && partitionTypes.length > 0) {
- recognized =
("org.eclipse.jst.jsp.core.jspsource".equals(partitionTypes[0]));
+ recognized =
("org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK".equals(partitionTypes[0]));
}
if (recognized) {
@@ -116,8 +116,8 @@
if (recognized) {
String childPartitionType =
seamViewPartitioner.getChildPartitionType(testData.document,
testData.getHyperlinkRegion());
- if (childPartitionType != null)
- System.out.println("position #" + i + " partitionType: " +
childPartitionType);
+// if (childPartitionType != null)
+// System.out.println("position #" + i + " partitionType: " +
childPartitionType);
if (childPartitionType != null) {
ArrayList test = (ArrayList)recognitionTest.get(childPartitionType);
@@ -151,7 +151,7 @@
r = (Region)regions.next();
if (r.getOffset() <= testData.offset && testData.offset <
(r.getOffset() + r.getLength()))
testResult = true;
- System.out.println(testData.getHyperlinkRegion().toString());
+// System.out.println(testData.getHyperlinkRegion().toString());
}
}
assertTrue("Wrong recognition for the region: " +
testData.getHyperlinkRegion().toString()
@@ -159,7 +159,7 @@
}
}
- assertEquals("Wrong recognized region count", 24 , counter);
+ assertEquals("Wrong recognized region count", 22 , counter);
model.releaseFromEdit();
Show replies by date