EmptyImplTest.java :  » Workflow-Engines » bexee » bexee » model » activity » Java Open Source

Java Open Source » Workflow Engines » bexee 
bexee » bexee » model » activity » EmptyImplTest.java
/*
 * $Id: EmptyImplTest.java,v 1.3 2004/11/22 08:47:46 kowap Exp $
 *
 * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
 * Berne University of Applied Sciences
 * School of Engineering and Information Technology
 * All rights reserved.
 */
package bexee.model.activity;

import org.jmock.*;

import bexee.core.*;
import bexee.model.activity.impl.EmptyImpl;

/**
 * @version $Revision: 1.3 $, $Date: 2004/11/22 08:47:46 $
 * @author Pawel Kowalski
 */
public class EmptyImplTest extends MockObjectTestCase {

    private EmptyImpl empty = null;

    /*
     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        empty = new EmptyImpl();
    }

    /*
     * @see TestCase#tearDown()
     */
    protected void tearDown() throws Exception {
        super.tearDown();
        empty = null;
    }

    //**************************************************/
    // test
    //**************************************************/

    //**************************************************/
    // bexee.model.activity.BPELElement
    //**************************************************/

    public final void testAccept() {
        Mock mockProcessController = new Mock(ProcessController.class);

        ProcessInstance processInstance = new ProcessInstance(null, null);

        mockProcessController.expects(once()).method("process").with(
                same(empty), same(processInstance));

        try {
            empty.accept((ProcessController) mockProcessController.proxy(),
                    processInstance);
        } catch (Exception e) {
            fail("Should not throw exception: " + e.getMessage());
        }

        mockProcessController.verify();
    }

    public final void testDefaultValues() {
        assertEquals(false, empty.isSuppressJoinFailure());
    }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.