📄 testtypepredicate.java
字号:
package org.jutiltest.predicate;import org.jutil.junit.JutilTest;import org.jutil.junit.CVSRevision;import org.jutil.predicate.TypePredicate;import org.jutil.predicate.Predicate;import org.jutil.predicate.Or;import org.jutil.predicate.And;import org.jutil.predicate.PrimitiveTotalPredicate;import org.jutil.predicate.TotalPredicate;import org.jutil.predicate.NegationAsFailure;import java.util.Collection;import java.util.ArrayList;public class TestTypePredicate extends JutilTest { public TestTypePredicate(String name) { super(name, new CVSRevision("1.3")); } public void setup() { } public void testTypePredicate() { Collection and = new ArrayList(); Collection or = new ArrayList(); and.add(new And()); and.add(new And()); and.add(new And()); and.add(new And()); or.add(new Or()); or.add(new Or()); or.add(new Or()); assertTrue(new TypePredicate(And.class).forall(and)); assertTrue(new TypePredicate(Or.class).forall(or)); assertTrue(! new TypePredicate(And.class).exists(or)); assertTrue(! new TypePredicate(Or.class).exists(and)); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -