/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.extension.mock;

import org.jmock.Mock;

/**
 * @author Shen Li
 */
public class MockObjectTestCase extends org.jmock.cglib.MockObjectTestCase {
    public Mock mockAbstactMethods(Class mockedType) {
        return mockAbstactMethods(mockedType, defaultMockNameForType(mockedType));
    }

    public Mock mockAbstactMethods(Class mockedType, Class[] argTypes, Object[] args) {
        return mockAbstactMethods(mockedType, defaultMockNameForType(mockedType), argTypes, args);
    }

    public Mock mockAbstactMethods(Class mockedType, String roleName) {
        return mockAbstactMethods(mockedType, roleName, new Class[0], new Object[0]);
    }

    public Mock mockAbstactMethods(Class mockedType, String roleName, Class[] argTypes, Object[] args) {
        Mock newMock = new Mock(new CglibCoreMock(mockedType, roleName, argTypes, args));
        registerToVerify(newMock);
        return newMock;
    }
}
