[switchyard-issues] [JBoss JIRA] Created: (SWITCHYARD-434) Update BPMMixIn to use the TestMixIn lifecycle methods (initialize() and uninitialize()) to start and stop the bpm task server

Tom Fennelly (JIRA) jira-events at lists.jboss.org
Mon Aug 29 13:01:26 EDT 2011


Update BPMMixIn to use the TestMixIn lifecycle methods (initialize() and uninitialize()) to start and stop the bpm task server
------------------------------------------------------------------------------------------------------------------------------

                 Key: SWITCHYARD-434
                 URL: https://issues.jboss.org/browse/SWITCHYARD-434
             Project: SwitchYard
          Issue Type: Enhancement
            Reporter: Tom Fennelly


Tests that currently look like...
{code}
public class HelpDeskTests {

    private BPMMixIn bpm;
    private HTTPMixIn http;

    @Test
    public void testHelpDesk() throws Exception {
        if (bpm.startTaskServer("Developer", "User")) {
            try {
                http.postResourceAndTestXML("http://localhost:18001/HelpDeskService", "/xml/soap-request.xml", "/xml/soap-response.xml");
                boolean keepWorking = true;
                while (keepWorking) {
                    keepWorking = bpm.completeTasksForUsers("Developer", "User");
                }
            } finally {
                bpm.stopTaskServer();
            }
        }
    }
}
{code}

Would end up looking like...


{code}
public class HelpDeskTests {

    private BPMMixIn bpm;
    private HTTPMixIn http;

    @Test
    public void testHelpDesk() throws Exception {
        http.postResourceAndTestXML("http://localhost:18001/HelpDeskService", "/xml/soap-request.xml", "/xml/soap-response.xml");
        boolean keepWorking = true;
        while (keepWorking) {
            keepWorking = bpm.completeTasksForUsers("Developer", "User");
        }
    }
}
{code}


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the switchyard-issues mailing list