Package example.atm.givens

Source Code of example.atm.givens.AccountDoesNotHaveOverdraftFacility

/*
* Created on 27-Aug-2004
*
* (c) 2003-2004 ThoughtWorks Ltd
*
* See license.txt for license details
*/
package example.atm.givens;


import org.jbehave.core.minimock.story.domain.GivenUsingMiniMock;
import org.jbehave.core.mock.Mock;
import org.jbehave.core.story.domain.World;

import example.domain.Account;


/** set overdraft limit = 0 */
public class AccountDoesNotHaveOverdraftFacility extends GivenUsingMiniMock {

    public void setUp(World world) {
        Mock account = (Mock) world.get("account", mock(Account.class));
        account.stubs("getOverdraftLimit").withNoArguments().will(returnValue(0));
    }

    public String getDescription() {
        return "set overdraft limit = 0";
    }
}
TOP

Related Classes of example.atm.givens.AccountDoesNotHaveOverdraftFacility

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.