CoCoME System Tests

org.cocome.tradingsystem.systests.util
Class GeneratedStockItem

java.lang.Object
  extended by org.cocome.tradingsystem.systests.util.GeneratedStockItem

public final class GeneratedStockItem
extends java.lang.Object

Simple storage class for generated products.

Version:
$Rev: 60 $
Author:
Benjamin Hummel, Christian Pfaller, $Author: pfaller $

Field Summary
(package private)  int amount
          The amount currently on stock.
(package private)  int maxAmount
          The amount theat could be at maximum in the store.
(package private)  int minAmount
          The amount theat should be at least available in the store.
(package private)  GeneratedProduct product
          The product this item is from.
(package private)  int salesPrice
          The sales price in cents.
 
Constructor Summary
GeneratedStockItem(GeneratedProduct product, int salesPrice, int amount, int minAmount, int maxAmount)
          Create a new instance.
 
Method Summary
 int getAmount()
          Returns the amount currently on stock.
 int getMaxAmount()
          Returns the maximum amount of products possible to keep in stock
 int getMinAmount()
          Returns the amount theat should be at least available in the store.
 GeneratedProduct getProduct()
          Returns the product this item is from.
 int getSalesPrice()
          Returns the sales price in cents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

product

final GeneratedProduct product
The product this item is from.


salesPrice

final int salesPrice
The sales price in cents.


amount

final int amount
The amount currently on stock.


minAmount

final int minAmount
The amount theat should be at least available in the store.


maxAmount

final int maxAmount
The amount theat could be at maximum in the store.

Constructor Detail

GeneratedStockItem

GeneratedStockItem(GeneratedProduct product,
                   int salesPrice,
                   int amount,
                   int minAmount,
                   int maxAmount)
Create a new instance. This has package visibility, as it should only be generated by the StockGenerator.

Method Detail

getAmount

public int getAmount()
Returns the amount currently on stock.


getMinAmount

public int getMinAmount()
Returns the amount theat should be at least available in the store.


getProduct

public GeneratedProduct getProduct()
Returns the product this item is from.


getSalesPrice

public int getSalesPrice()
Returns the sales price in cents.


getMaxAmount

public int getMaxAmount()
Returns the maximum amount of products possible to keep in stock


CoCoME System Tests

CoCoME System Tests - 0.1