本文整理汇总了Java中org.ofbiz.base.test.GenericTestCaseBase类的典型用法代码示例。如果您正苦于以下问题:Java GenericTestCaseBase类的具体用法?Java GenericTestCaseBase怎么用?Java GenericTestCaseBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GenericTestCaseBase类属于org.ofbiz.base.test包,在下文中一共展示了GenericTestCaseBase类的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);
}
示例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);
}
示例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);
}
示例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);
}