001    package org.cocome.tradingsystem.systests.interfaces;
002    
003    /**
004     * Interface of the display visible to the user displaying product information
005     * and the running total. As the exact format of the display output is not
006     * specified, there are many methods to dermine the meaning of the display
007     * contents. These must be implemented by the glue code (which in turn should
008     * know enough about the actual implementation to extract this information).
009     * 
010     * @author Benjamin Hummel
011     * @author Christian Pfaller
012     * @author $Author: hummel $
013     * @version $Rev: 47 $
014     * @levd.rating GREEN Rev: 47
015     */
016    public interface IUserDisplay extends IUpdateReceiver {
017    
018            /**
019             * Determines if the display currently shows the apropriate message to
020             * indicate scan of an invalid / unkown barcode; returns false otherwise
021             */
022            public boolean isMessageForInvalidBarcodeShown() throws Exception;
023    
024            /**
025             * Determines if the display currently shows the expected name of a product,
026             * returns false if not.
027             * 
028             * @param expectedName -
029             *            name of prodouct to be expeted in display
030             */
031            public boolean isProductNameShown(String expectedName) throws Exception;
032    
033            /**
034             * Determines if the display currently shows the expected price of a
035             * product, returns false if not.
036             * 
037             * @param expectedPrice -
038             *            price of product to be expeted in display
039             */
040            public boolean isPriceShown(int expectedPrice) throws Exception;
041    
042            /**
043             * Determines if the display currently shows the aporpriate message to
044             * indicate express mode.
045             */
046            public boolean isMessageForExpressModeShown() throws Exception;
047    
048            /**
049             * Determines if the display currently shows the apropriate message to
050             * indicate payment by credit card is not possible.
051             */
052            public boolean isMessageForCreditCardNotPossibleShown() throws Exception;
053    
054            /**
055             * Determines if the display currently shows the apropriate message to
056             * indicate payment by credit card was successful.
057             */
058            public boolean isMessageForCreditCardPaymentSuccessfulShown()
059                            throws Exception;
060    
061            /**
062             * Determines if the display currently shows the apropriate message to
063             * indicate a failed validation of a credit card.
064             */
065            public boolean isMessageForCreditCardValidationFailedShown()
066                            throws Exception;
067    }