Package com.asakusafw.testdriver.rule

Examples of com.asakusafw.testdriver.rule.CompareOperator


    public ValuePredicate<?> resolve(
            VerifyContext context,
            PropertyName name,
            PropertyType type,
            String expression) throws FormatException {
        CompareOperator operator = OPERATORS.get(expression.trim());
        if (operator == null) {
            return null;
        }
        switch (type) {
        case BYTE:
        case SHORT:
        case INT:
        case LONG:
            return new IntegerCompare(operator);
        case FLOAT:
        case DOUBLE:
            return new FloatCompare(operator);
        case DECIMAL:
            return new DecimalCompare(operator);
        case DATE:
        case DATETIME:
            return new CalendarCompare(operator);
        default:
            throw new FormatException(MessageFormat.format(
                    "Property does not support compare(\"{0}\") expression: {1}",
                    operator.getSymbol(),
                    name));
        }
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.rule.CompareOperator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.