CoCoME System Tests

org.cocome.tradingsystem.systests.scenarios
Class TestScenarioBase.StoreWrapper

java.lang.Object
  extended by org.cocome.tradingsystem.systests.scenarios.TestScenarioBase.StoreWrapper
Enclosing class:
TestScenarioBase

protected class TestScenarioBase.StoreWrapper
extends java.lang.Object

Class holding a store and some management information.


Field Summary
private  java.util.List<ICashDesk> cashDesks
          The list of cash desks for this store.
private  java.util.Random rng
           
private  StockGenerator stockGenerator
          The stock generator used for generator stock items.
private  IStorePC storePC
          The store PC for the store.
 
Constructor Summary
TestScenarioBase.StoreWrapper(IStorePC storePC)
          Creates a new instance.
 
Method Summary
 void createCashDesk()
          Creates a new cash line for this store.
 ICashDesk getCashDesk(int i)
          Returns the cash desk of the given index.
 GeneratedStockItem getItemLowOnStock()
          Returns a product which is low on stock (amount <= minAmount)
 int getNumberOfCashDesks()
          Returns the number of cash desks for this store.
 GeneratedProduct getProductReadyForSale()
          Returns a product which is ready for sale (amount in stock > 0)
 StockGenerator getStockGenerator()
          Returns the stock generator used for generator stock items.
 IStorePC getStorePC()
          Returns the store PC for the store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rng

private final java.util.Random rng

storePC

private final IStorePC storePC
The store PC for the store.


stockGenerator

private final StockGenerator stockGenerator
The stock generator used for generator stock items.


cashDesks

private final java.util.List<ICashDesk> cashDesks
The list of cash desks for this store.

Constructor Detail

TestScenarioBase.StoreWrapper

public TestScenarioBase.StoreWrapper(IStorePC storePC)
Creates a new instance.

Parameters:
storePC - the store PC for the store.
Method Detail

createCashDesk

public void createCashDesk()
                    throws java.lang.Exception
Creates a new cash line for this store.

Throws:
java.lang.Exception

getNumberOfCashDesks

public int getNumberOfCashDesks()
Returns the number of cash desks for this store.


getCashDesk

public ICashDesk getCashDesk(int i)
Returns the cash desk of the given index.


getStockGenerator

public StockGenerator getStockGenerator()
Returns the stock generator used for generator stock items.


getStorePC

public IStorePC getStorePC()
Returns the store PC for the store.


getProductReadyForSale

public GeneratedProduct getProductReadyForSale()
Returns a product which is ready for sale (amount in stock > 0)


getItemLowOnStock

public GeneratedStockItem getItemLowOnStock()
Returns a product which is low on stock (amount <= minAmount)


CoCoME System Tests

CoCoME System Tests - 0.1