CoCoME System Tests

org.cocome.tradingsystem.systests.interfaces
Interface IEnterprise


public interface IEnterprise

Interface of the entire enterprise. This is used to create new products and check some global conditions on order state (so for most implementations this is just another database wrapper).

Version:
$Rev: 47 $
Author:
Benjamin Hummel, Christian Pfaller, $Author: hummel $

Method Summary
 IProduct createProduct(int barcode, int purchasePrice, java.lang.String name)
          Creates a new product.
 boolean existsProductTransfer(IProduct product, IStorePC storeFrom, IStorePC storeTo)
          Returns whether there is a product transfer requested (might be visible by orders in the database).
 

Method Detail

createProduct

IProduct createProduct(int barcode,
                       int purchasePrice,
                       java.lang.String name)
                       throws java.lang.Exception
Creates a new product. This is used for the initial creation of test data. Additional fields required by the database should be provided by the test driver.

Parameters:
barcode - the barcode of the product.
purchasePrice - the purchase price in Cent.
name - the name of the product.
Returns:
the product created.
Throws:
java.lang.Exception

existsProductTransfer

boolean existsProductTransfer(IProduct product,
                              IStorePC storeFrom,
                              IStorePC storeTo)
Returns whether there is a product transfer requested (might be visible by orders in the database). The number of products is not relevant here.

Parameters:
product - the product to be transfered.
storeFrom - the store which has to deliver the product.
storeTo - the store which should receive the product.
Returns:
whether there is a product transfer requested.

CoCoME System Tests

CoCoME System Tests - 0.1