use of org.osmorc.manifest.lang.psi.AssignmentExpression in project intellij-plugins by JetBrains.
the class OsgiManifestPsiTest method assertAssignment.
private static void assertAssignment(ManifestFile file, boolean attribute, String name, String expected) {
List<Header> headers = file.getHeaders();
assertEquals(1, headers.size());
List<HeaderValue> clauses = headers.get(0).getHeaderValues();
assertEquals(1, clauses.size());
assertTrue(clauses.get(0) instanceof Clause);
Clause clause = (Clause) clauses.get(0);
AssignmentExpression element = attribute ? clause.getAttribute(name) : clause.getDirective(name);
if (expected != null) {
assertNotNull(element);
assertEquals(expected, element.getValue());
} else {
assertNull(element);
}
}
Aggregations