当前位置: 首页>>代码示例>>Java>>正文


Java GenericTestCaseBase.list方法代码示例

本文整理汇总了Java中org.ofbiz.base.test.GenericTestCaseBase.list方法的典型用法代码示例。如果您正苦于以下问题:Java GenericTestCaseBase.list方法的具体用法?Java GenericTestCaseBase.list怎么用?Java GenericTestCaseBase.list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ofbiz.base.test.GenericTestCaseBase的用法示例。


在下文中一共展示了GenericTestCaseBase.list方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testConditionList

import org.ofbiz.base.test.GenericTestCaseBase; //导入方法依赖的package包/类
public void testConditionList() {
    BooleanCondition b1 = new BooleanCondition(l1, "=", l2);
    BooleanCondition b2 = new BooleanCondition(l2, "=", l3);
    ConditionList c1 = new ConditionList(Joiner.AND, GenericTestCaseBase.<Condition>list(b1));
    conditionListTest("c1", c1, Joiner.AND, list(b1), "( 1 = 5 )", null, false);
    ConditionList c2 = new ConditionList(Joiner.AND, GenericTestCaseBase.<Condition>list(b1, b2));
    conditionListTest("c2", c2, Joiner.AND, list(b1, b2), "( 1 = 5 AND 5 = 10 )", c1, false);
    ConditionList c3 = new ConditionList(Joiner.OR, GenericTestCaseBase.<Condition>list(b2, b1));
    conditionListTest("c3", c3, Joiner.OR, list(b2, b1), "( 5 = 10 OR 1 = 5 )", c1, false);
    ConditionList c4 = new ConditionList(Joiner.AND, GenericTestCaseBase.<Condition>list(b1));
    conditionListTest("c4", c4, Joiner.AND, list(b1), "( 1 = 5 )", c1, true);
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:13,代码来源:ConditionsTest.java

示例2: testListCondition

import org.ofbiz.base.test.GenericTestCaseBase; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void testListCondition() {
    ListCondition c1 = new ListCondition(l1, "IN", GenericTestCaseBase.<Value>list(l2));
    listConditionTest("c1", c1, l1, "in", list(l2), "1 in (5)", null, false);
    ListCondition c2 = new ListCondition(l1, "NOT IN", GenericTestCaseBase.<Value>list(l2));
    listConditionTest("c2", c2, l1, "not in", list(l2), "1 not in (5)", c1, false);
    ListCondition c3 = new ListCondition(l2, "IN", GenericTestCaseBase.<Value>list(l3));
    listConditionTest("c3", c3, l2, "in", list(l3), "5 in (10)", c1, false);
    ListCondition c4 = new ListCondition(l1, "IN", GenericTestCaseBase.<Value>list(l2, l3));
    listConditionTest("c4", c4, l1, "in", list(l2, l3), "1 in (5, 10)", c1, false);
    ListCondition c5 = new ListCondition(l1, "IN", GenericTestCaseBase.<Value>list(l2));
    listConditionTest("c5", c5, l1, "in", list(l2), "1 in (5)", c1, true);
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:14,代码来源:ConditionsTest.java

示例3: testFunctionCall

import org.ofbiz.base.test.GenericTestCaseBase; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void testFunctionCall() {
    FunctionCall v1 = new FunctionCall("LENGTH", GenericTestCaseBase.<Value>list(nv1, nv2));
    functionCallTest("v1", v1, "LENGTH", list(nv1, nv2), "LENGTH(1, 2.0)", null, false);
    FunctionCall v2 = new FunctionCall("LENGTH", GenericTestCaseBase.<Value>list(nv1, nv3));
    functionCallTest("v2", v2, "LENGTH", list(nv1, nv3), "LENGTH(1, 3)", v1, false);
    FunctionCall v3 = new FunctionCall("LENGTH", GenericTestCaseBase.<Value>list(nv1, nv2));
    functionCallTest("v3", v3, "LENGTH", list(nv1, nv2), "LENGTH(1, 2.0)", v1, true);
    FunctionCall v4 = new FunctionCall("TRIM", GenericTestCaseBase.<Value>list(nv1, nv2));
    functionCallTest("v4", v4, "TRIM", list(nv1, nv2), "TRIM(1, 2.0)", v1, false);
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:12,代码来源:ValuesTest.java

示例4: testMathValue

import org.ofbiz.base.test.GenericTestCaseBase; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void testMathValue() {
    MathValue v1 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv2));
    mathValueTest("v1", v1, "+", list(nv1, nv2), "(1 + 2.0)", null, false);
    MathValue v2 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv3));
    mathValueTest("v2", v2, "+", list(nv1, nv3), "(1 + 3)", v1, false);
    MathValue v3 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv2));
    mathValueTest("v3", v3, "+", list(nv1, nv2), "(1 + 2.0)", v1, true);
    MathValue v4 = new MathValue("-", GenericTestCaseBase.<ConstantValue>list(nv1, nv3));
    mathValueTest("v4", v4, "-", list(nv1, nv3), "(1 - 3)", v1, false);
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:12,代码来源:ValuesTest.java


注:本文中的org.ofbiz.base.test.GenericTestCaseBase.list方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。