Examples of FunctionEnum


Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testMissingFunctionArgumentFailure() throws SemanticWarning {
        err.println("testMissingFunctionArgumentFailure");
        FunctionEnum funcEnum = FunctionEnum.REACTION;
        Term t = new Term(funcEnum);

        subject.checkTerm(t);
        fail("expected semantic failure");
    }
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test
    public void testFunctionOnlyArguments() {
        err.println("testFunctionOnlyArguments");
        FunctionEnum funcEnum = FunctionEnum.REACTION;
        List<BELObject> args = new ArrayList<BELObject>();
        args.add(new Term(FunctionEnum.REACTANTS));
        args.add(new Term(FunctionEnum.PRODUCTS));
        Term t = new Term(funcEnum, args);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test
    public void testEncodingArgument() {
        err.println("testEncodingArgument");
        FunctionEnum funcEnum = FunctionEnum.ABUNDANCE;
        List<BELObject> args = new ArrayList<BELObject>();
        Parameter abundance = getInstance().createParameter(null, "value");
        args.add(abundance);
        Term t = new Term(funcEnum, args);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test
    public void testFunctionArgument() {
        err.println("testFunctionArgument");
        FunctionEnum funcEnum = FunctionEnum.CATALYTIC_ACTIVITY;
        List<BELObject> args = new ArrayList<BELObject>();
        Term complexAbundance = new Term(FunctionEnum.COMPLEX_ABUNDANCE);
        args.add(complexAbundance);
        Term t = new Term(funcEnum, args);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test
    public void testComplexArgument() {
        err.println("testComplexArgument");
        FunctionEnum funcEnum = FunctionEnum.COMPLEX_ABUNDANCE;
        List<BELObject> args = new ArrayList<BELObject>();
        Parameter parameter = getInstance().createParameter(null, "value");
        args.add(parameter);
        Term t = new Term(funcEnum, args);

        try {
            subject.checkParameterizedTerm(t);
        } catch (SemanticWarning se) {
            fail("unexpected semantic failure: " + se.getUserFacingMessage());
        }

        args.clear();

        int abundances = random.nextInt(10) + 1;
        for (int i = 0; i < abundances; i++) {
            FunctionEnum fe = randomFunctionEnum();
            while (fe.getReturnType() != ReturnType.ABUNDANCE) {
                fe = randomFunctionEnum();
            }
            args.add(new Term(fe));
        }
        t = new Term(funcEnum, args);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testMultipleEncodings() throws SemanticWarning {
        err.println("testMultipleEncodings");
        FunctionEnum funcEnum = FunctionEnum.COMPLEX_ABUNDANCE;
        List<BELObject> args = new ArrayList<BELObject>();
        Parameter g1 = getInstance().createParameter(null, "value1");
        Parameter g2 = getInstance().createParameter(null, "value2");
        args.add(g1);
        args.add(g2);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testTooManyArgumentsFailure() throws SemanticWarning {
        err.println("testTooManyArgumentsFailure");
        FunctionEnum funcEnum = FunctionEnum.PHOSPHATASE_ACTIVITY;
        List<BELObject> args = new ArrayList<BELObject>();
        Parameter abundance1 = getInstance().createParameter(null, "value1");
        Parameter abundance2 = getInstance().createParameter(null, "value2");
        args.add(abundance1);
        args.add(abundance2);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testTooFewArgumentsFailure() throws SemanticWarning {
        err.println("testTooFewArgumentsFailure");
        FunctionEnum funcEnum = FunctionEnum.TRANSLOCATION;
        List<BELObject> args = new ArrayList<BELObject>();

        Term abundance = new Term(FunctionEnum.COMPOSITE_ABUNDANCE);
        args.add(abundance);
        args.add(getInstance().createParameter(null, "value1"));
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testTicket106_1() throws SemanticWarning {
        err.println("testTicket106_1");
        FunctionEnum funcEnum = FunctionEnum.PROTEIN_ABUNDANCE;
        List<BELObject> args = new ArrayList<BELObject>();

        Parameter arg1 = getInstance().createParameter(null, "value1");
        Term arg2 = new Term(FunctionEnum.SUBSTITUTION);
        Term arg3 = new Term(FunctionEnum.SUBSTITUTION);
View Full Code Here

Examples of org.openbel.framework.common.enums.FunctionEnum

    }

    @Test(expected = SemanticWarning.class)
    public void testTicket106_2() throws SemanticWarning {
        err.println("testTicket106_2");
        FunctionEnum funcEnum = FunctionEnum.COMPLEX_ABUNDANCE;
        List<BELObject> args = new ArrayList<BELObject>();

        Term arg1 = new Term(FunctionEnum.ABUNDANCE);
        Term arg2 = new Term(FunctionEnum.BIOLOGICAL_PROCESS);
        args.addAll(asList(new BELObject[] { arg1, arg2 }));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.