use of org.eclipse.core.internal.expressions.AdaptExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testAdaptExpressionFail.
public void testAdaptExpressionFail() throws Exception {
// $NON-NLS-1$
AdaptExpression expression = new AdaptExpression("org.eclipse.core.internal.expressions.tests.NotExisting");
EvaluationResult result = expression.evaluate(new EvaluationContext(null, new Adaptee()));
assertTrue(result == EvaluationResult.FALSE);
}
use of org.eclipse.core.internal.expressions.AdaptExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testAdaptExpressionNotEqual.
public void testAdaptExpressionNotEqual() throws Exception {
AdaptExpression expression1 = new AdaptExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter");
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter1"));
AdaptExpression expression2 = new AdaptExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter");
expression2.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter2"));
assertTrue("These adapt expressions should not be equal", !expression1.equals(expression2));
}
Aggregations