All pastes #344708 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-07 23:07 UTC
rendered paste body
package model;

import junit.framework.*;

public class CashBoxTest extends TestCase {
    
    public CashBoxTest(String testName) {
        super(testName);
    }
    
    public void testMakeDeposit () {
        CashBox c = new CashBox();
        int testDeposit = 4000;
        int testPrice = 3999;
        int expectedExchange = 1;
        c.makeDeposit(testDeposit, testPrice);
        if(!c.getInfo().equalsIgnoreCase("\nPrice: " + testPrice + "\nPayment: " + testDeposit + "\nExchange: " + expectedExchange)) {
            fail("Method makeDeposit failed!");
        }
    }
}