CoCoME System Tests

org.cocome.tradingsystem.systests.scenarios
Class ManageExpressCheckoutBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.cocome.tradingsystem.systests.scenarios.TestScenarioBase
              extended by org.cocome.tradingsystem.systests.scenarios.ProcessSaleBase
                  extended by org.cocome.tradingsystem.systests.scenarios.ManageExpressCheckoutBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ManageExpressCheckoutTest

public abstract class ManageExpressCheckoutBase
extends ProcessSaleBase

This is an abstract base class for specifiying test scenarios which should be executed in the express sales mode. It provides methods for putting the system to express mode and verify express mode.

Version:
$Rev: 64 $
Author:
Christian Pfaller, $Author: hummel $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.cocome.tradingsystem.systests.scenarios.TestScenarioBase
TestScenarioBase.StoreWrapper
 
Field Summary
static int MAXIMUM_ITEMS_AT_EXPRESS_SALE
          The maximum number of items allowed in an express sale.
 
Fields inherited from class org.cocome.tradingsystem.systests.scenarios.ProcessSaleBase
cashBox, cashDesk, currentlySold, expectedAmounts, priceSum, products, store
 
Fields inherited from class org.cocome.tradingsystem.systests.scenarios.TestScenarioBase
bank, enterprise, productGenerator, seedRng, stores, testDriver
 
Constructor Summary
ManageExpressCheckoutBase()
           
 
Method Summary
protected  void checkExpressModeLightsOn()
          Executes actions to check the Lights display is switched on correctly.
protected  void checkNotificationOfExpressMode()
          Executes actions to check notification of express mode.
private  void performExpressSale()
          The methods performs a single sale with the maximum possible number of items for a express sale.
protected  void putCashDeskInExpressMode()
          Executes some express sales to put cash desk in express mode.
abstract  void testScenario()
          Executes the test scenario.
 
Methods inherited from class org.cocome.tradingsystem.systests.scenarios.ProcessSaleBase
enterAllRemainingProducts, enterProducts, finishSale, handleCashPayment, initializeCashDesk, purchase, setUp, startNewSale, startNewSale, updateInventory
 
Methods inherited from class org.cocome.tradingsystem.systests.scenarios.TestScenarioBase
copySetup, createStore, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAXIMUM_ITEMS_AT_EXPRESS_SALE

public static int MAXIMUM_ITEMS_AT_EXPRESS_SALE
The maximum number of items allowed in an express sale.

Constructor Detail

ManageExpressCheckoutBase

public ManageExpressCheckoutBase()
Method Detail

testScenario

public abstract void testScenario()
                           throws java.lang.Exception
Executes the test scenario.

Throws:
java.lang.Exception

putCashDeskInExpressMode

protected void putCashDeskInExpressMode()
                                 throws java.lang.Exception
Executes some express sales to put cash desk in express mode.

Throws:
java.lang.Exception

checkNotificationOfExpressMode

protected void checkNotificationOfExpressMode()
                                       throws java.lang.Exception
Executes actions to check notification of express mode.

Throws:
java.lang.Exception

checkExpressModeLightsOn

protected void checkExpressModeLightsOn()
                                 throws java.lang.Exception
Executes actions to check the Lights display is switched on correctly.

Throws:
java.lang.Exception

performExpressSale

private void performExpressSale()
                         throws java.lang.Exception
The methods performs a single sale with the maximum possible number of items for a express sale.

Throws:
java.lang.Exception

CoCoME System Tests

CoCoME System Tests - 0.1