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

📄 testfork.java

📁 一个很好的微工作流内核
💻 JAVA
字号:
/* * 	  *  Copyright (c) 2002, 2003 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.test;import junit.framework.Test;import junit.framework.TestSuite;import com.microworkflow.process.*;import com.microworkflow.execution.*;public class TestFork extends TestActivity {	public TestFork(String arg0) {		super(arg0);	}	public static void main(String[] args) {		junit.swingui.TestRunner.run(TestFork.class);	}	public static Test suite() {		return new TestSuite(TestFork.class);	}	public void testFork() {		Primitive p1 = new Primitive(O1_KEY, new Performer() {			public Object execute() {				if (context.containsKey(targetKey)) {					DomainObject domainObject = (DomainObject) getTarget();					domainObject.setSlotA("AA");				}				return null;			}		});		Primitive p2 = new Primitive(O1_KEY, new Performer() {			public Object execute() {				if (context.containsKey(targetKey)) {					DomainObject domainObject = (DomainObject) getTarget();					domainObject.setSlotB("BB");				}				return null;			}		});		Primitive p3 = new Primitive(O1_KEY, new Performer() {			public Object execute() {				if (context.containsKey(targetKey)) {					DomainObject domainObject = (DomainObject) getTarget();					domainObject.setSlotC("CC");				}				return null;			}		});		Fork fork = new Fork();		fork.addBranch(p1);		fork.addBranch(p2);		fork.addBranch(p3);		wc = executeWorkflow(fork);		DomainObject domainObject = (DomainObject) wc.get(O1_KEY);		assertEquals("Slot A", "AA", domainObject.getSlotA());		assertEquals("Slot B", "BB", domainObject.getSlotB());		assertEquals("Slot C", "CC", domainObject.getSlotC());	}}

⌨️ 快捷键说明

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