001 package org.cocome.tradingsystem.systests.interfaces;
002
003 /**
004 * Interface of the cashbox consisting of a "box" containing the money and some
005 * keys allowing user input. We do not model explicit key presses at this level.
006 * It is the responsibility of the test driver to resolve these high level
007 * commands to single key strokes if the application requires this.
008 *
009 * @author Benjamin Hummel
010 * @author Christian Pfaller
011 * @author $Author: hummel $
012 * @version $Rev: 47 $
013 * @levd.rating GREEN Rev: 47
014 */
015 public interface ICashBox extends IUpdateReceiver {
016
017 /**
018 * Returns whether the open signal for the cashbox has been sent (and not
019 * yet been read).
020 */
021 boolean wasOpenSignalSent() throws Exception;
022
023 /**
024 * Returns the current status of the cashbox to the system. This is called
025 * only when the status changes, but the test driver may support some
026 * polling mechanism or regular sending of the status if the implementation
027 * of the system requires this.
028 *
029 * @param closed
030 * true if the cashbox is closed.
031 */
032 void setCashboxStatus(boolean closed) throws Exception;
033
034 /** Corresponds to pressing the "new sale" button. */
035 void startNewSale() throws Exception;
036
037 /** Corresponds to pressing the "sale finished" button. */
038 void finishSale() throws Exception;
039
040 /** Corresponds to pressing the "cash payment" button. */
041 void startCashPayment() throws Exception;
042
043 /** Corresponds to pressing the "credit card payment" button. */
044 void startCreditCardPayment() throws Exception;
045
046 /**
047 * Enter the amount of cash received. This might be resolved to multiple key
048 * presses by the test driver.
049 *
050 * @param centAmount
051 * the amount in Cent (or whatever currency)
052 */
053 void enterReceivedCash(int centAmount) throws Exception;
054
055 /**
056 * Manually enable the credit card reader to be able to take credit card
057 * payment while in expressmode
058 */
059 void manuallyEnableCreditCardReader() throws Exception;
060 }