CoCoME System Tests

org.cocome.tradingsystem.systests.scenarios
Class ProcessSaleCreditCardTest

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.ProcessSaleCreditCardTest
All Implemented Interfaces:
junit.framework.Test

public class ProcessSaleCreditCardTest
extends ProcessSaleBase

This test covers use case 1 (ProcessSale) for credit card payment without any exceptions.

Version:
$Revision: 1.1 $
Author:
Christian Pfaller, $Author: hummel $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.cocome.tradingsystem.systests.scenarios.TestScenarioBase
TestScenarioBase.StoreWrapper
 
Field Summary
private static int CARD_MONEY
          Mony available for the credit card, given in cents Thus 1 Million Euro should be enough to cover every sale
private static int CARD_NUMBER
          Number of valid credit card in this test
private static int CARD_PIN
          PIN of valid credit card in ths test
 
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
ProcessSaleCreditCardTest()
           
 
Method Summary
protected  void handleCreditCardPayment()
          Executes actions for credit card payment.
 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

CARD_NUMBER

private static final int CARD_NUMBER
Number of valid credit card in this test

See Also:
Constant Field Values

CARD_PIN

private static final int CARD_PIN
PIN of valid credit card in ths test

See Also:
Constant Field Values

CARD_MONEY

private static final int CARD_MONEY
Mony available for the credit card, given in cents Thus 1 Million Euro should be enough to cover every sale

See Also:
Constant Field Values
Constructor Detail

ProcessSaleCreditCardTest

public ProcessSaleCreditCardTest()
Method Detail

testScenario

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

Throws:
java.lang.Exception

handleCreditCardPayment

protected void handleCreditCardPayment()
                                throws java.lang.Exception
Executes actions for credit card payment. Corresponds to step 5 b. in use case 1.

Throws:
java.lang.Exception

CoCoME System Tests

CoCoME System Tests - 0.1