1 /*
2 * $Id: GWES_GWUITest.java 1529 2011-06-22 16:37:19Z hoheisel $
3 *
4 * Copyright (c) 2005, The K-Wf Grid Consortium
5 * Fraunhofer Institute for Computer Architecture and Software Technology
6 * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
7 */
8
9 package net.kwfgrid.gwes;
10
11 import junit.framework.Test;
12 import junit.framework.TestSuite;
13 import net.kwfgrid.gwes.exception.LoggingException;
14 import org.apache.log4j.Logger;
15
16 /**
17 * @author Andreas Hoheisel
18 * (<a href="http://www.andreas-hoheisel.de">www.andreas-hoheisel.de</a>)
19 * @version $Id: GWES_GWUITest.java 1529 2011-06-22 16:37:19Z hoheisel $
20 */
21 public final class GWES_GWUITest extends LocalGWESAbstractTestCase {
22
23 /**
24 * log4j logger
25 */
26 static Logger logger = Logger.getLogger(GWES_GWUITest.class);
27
28 public final String userID;
29
30 GWESEngine gwes;
31
32 String workflowID;
33
34 /**
35 * Create the test case.
36 *
37 * @param testName name of the test case
38 */
39 public GWES_GWUITest(String testName) throws LoggingException {
40 super(testName);
41 userID = System.getProperty("user.name");
42 }
43
44 /**
45 * @return the suite of tests being tested
46 */
47 public static Test suite() {
48 return new TestSuite(GWES_GWUITest.class);
49 }
50
51
52 // /**
53 // */
54 // public void testWithListener() throws InterruptedException, SubscriptionFailed {
55 // boolean test = false;
56 // try {
57 // String fn = "src/test/net/kwfgrid/gwes/gworkflowdl_duplicate.xml";
58 // gwes = new GWESEngine();
59 // workflowID = gwes.initiate(readfile(fn), userID);
60 // logger.info("workflowID: " + workflowID);
61 //
62 // gwes.subscribe("theClient",
63 // workflowID + ",net.kwfgrid.gworkflowdl.protocol.WorkflowModificationNotification",
64 // "net.kwfgrid.gwes.uiproxy.linked.WorkflowModificationNotificationBuffer",
65 // new String[]{"Buffer.size"},
66 // new String[]{"" + 1000});
67 //
68 // gwes.start(workflowID);
69 //
70 // waitWorkflowStatus(gwes, workflowID);
71 //
72 // /* evaluate results */
73 // String retGWorkflowDL = gwes.getWorkflowDescription(workflowID);
74 // logger.info("\n" + retGWorkflowDL);
75 //
76 // List tokens = extractTokens(retGWorkflowDL);
77 // Assert.assertEquals(6, tokens.size());
78 //
79 // test = true;
80 // } catch (IOException e) {
81 // logger.error("exception:", e);
82 // } catch (JDOMException e) {
83 // logger.error("exception:", e);
84 // } catch (JaxenException e) {
85 // logger.error("exception:", e);
86 // } catch (NoSuchWorkflowException e) {
87 // logger.error("exception:", e);
88 // } catch (StateTransitionException e) {
89 // logger.error("exception:", e);
90 // } catch (WorkflowFormatException e) {
91 // logger.error("exception:", e);
92 // }
93 // Assert.assertTrue(test);
94 // }
95
96 }