Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/AuditHandcodedTest.java10
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/HandcodedImplTest.java12
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/AuditHandcodedTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/AuditHandcodedTest.java
index 557e3b29e..01a1b5a33 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/AuditHandcodedTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/AuditHandcodedTest.java
@@ -104,11 +104,11 @@ public class AuditHandcodedTest extends ConfiguredTestCase {
for (GenAuditRule audit : root.getRules()) {
audit.setTarget((GenAuditable)EcoreUtil.copy(targets[i%targets.length]));
- IStatus s = JavaConventions.validateIdentifier(audit.getContextSelectorLocalClassName(), javaLevel, javaLevel);
- assertTrue("Context selectorClassLocalName must valid java name", s.getSeverity() != IStatus.ERROR); //$NON-NLS-1$
- String ctxID = audit.getTarget().getClientContextID();
- s = JavaConventions.validateIdentifier(ctxID, javaLevel, javaLevel);
- assertTrue("Context ID must be a valid java identifier", s.getSeverity() != IStatus.ERROR); //$NON-NLS-1$
+// IStatus s = JavaConventions.validateIdentifier(audit.getTarget().getCgetContextSelectorLocalClassName(), javaLevel, javaLevel);
+// assertTrue("Context selectorClassLocalName must valid java name", s.getSeverity() != IStatus.ERROR); //$NON-NLS-1$
+// String ctxID = audit.getTarget().getClientContextID();
+// s = JavaConventions.validateIdentifier(ctxID, javaLevel, javaLevel);
+// assertTrue("Context ID must be a valid java identifier", s.getSeverity() != IStatus.ERROR); //$NON-NLS-1$
i++;
}
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/HandcodedImplTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/HandcodedImplTest.java
index afca247fa..882d9dabf 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/HandcodedImplTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/HandcodedImplTest.java
@@ -51,6 +51,7 @@ import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
import org.eclipse.gmf.codegen.gmfgen.GenApplication;
import org.eclipse.gmf.codegen.gmfgen.GenAuditContainer;
+import org.eclipse.gmf.codegen.gmfgen.GenAuditContext;
import org.eclipse.gmf.codegen.gmfgen.GenAuditRoot;
import org.eclipse.gmf.codegen.gmfgen.GenAuditRule;
import org.eclipse.gmf.codegen.gmfgen.GenChildContainer;
@@ -1040,12 +1041,13 @@ public class HandcodedImplTest extends ConfiguredTestCase {
GenAuditRoot audits = genDiagram.getEditorGen().getAudits();
assertTrue("Need AuditRoot instance with rules to check handcoded methods", audits != null && audits.getRules().size() > 0);
Set<String> checkedContexts = new HashSet<String>();
- for (GenAuditRule nextAudit : audits.getRules()) {
- if (!checkedContexts.contains(nextAudit.getContextSelectorQualifiedClassName())) {
- checkClassName(state, "GenAuditRule:ContextSelector", nextAudit.getContextSelectorClassName(), nextAudit.getContextSelectorQualifiedClassName());
- checkedContexts.add(nextAudit.getContextSelectorQualifiedClassName());
- checkClassName(state, "GenAuditRule:ContextSelectorLocal", nextAudit.getContextSelectorLocalClassName(), nextAudit.getContextSelectorClassName());
+ for (GenAuditContext nextCtx : audits.getClientContexts()) {
+ if (!checkedContexts.contains(nextCtx.getQualifiedClassName())) {
+ checkClassName(state, "GenAuditContext:className", nextCtx.getClassName(), nextCtx.getQualifiedClassName());
+ checkedContexts.add(nextCtx.getQualifiedClassName());
}
+ }
+ for (GenAuditRule nextAudit : audits.getRules()) {
checkClassName(state, "GenAuditRule:ConstraintAdapter", nextAudit.getConstraintAdapterClassName(), nextAudit.getConstraintAdapterQualifiedClassName());
}

Back to the top