⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testiterative.java

📁 一个很好的微工作流内核
💻 JAVA
字号:
/* * 	  *  Copyright (c) 2003 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.test;import com.microworkflow.execution.Performer;import com.microworkflow.process.Iterative;import com.microworkflow.process.Primitive;import junit.framework.Test;import junit.framework.TestSuite;/** * @author dam */public class TestIterative extends TestActivity {	public TestIterative(String arg0) {		super(arg0);	}		public static void main(String[] args) {		junit.swingui.TestRunner.run(TestIterative.class);	}	public static Test suite() {		return new TestSuite(TestIterative.class);	}	public void testIterative() {		Primitive body=new Primitive("component", new Performer(){			public Object execute() {				String component=(String)getTarget();				DomainObject domainObject=(DomainObject)get(O1_KEY);				if (domainObject.getString() != null) {					domainObject.setString(domainObject.getString().concat(component));				} else {					domainObject.setString(component);				}				return this;			}		});		Iterative iterative=new Iterative(O1_KEY,			new Performer(){				public Object execute() {					DomainObject target=(DomainObject)getTarget();					return target.getComponents();				}			},			"component",			body);		wc=executeWorkflow(iterative);		DomainObject domainObject=(DomainObject)wc.get(O1_KEY);		assertTrue(DomainObject.TEST_STRING.concat("onetwothreefour").equalsIgnoreCase(domainObject.getString()));	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -