public class OperationsTester extends BaseJDBCTestCase implements Display
Modifier and Type | Field and Description |
---|---|
private Operations |
ops |
private OERandom |
rand |
private short |
w |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
OperationsTester(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
displayNewOrder(java.lang.Object displayData,
Warehouse warehouse,
District district,
Customer customer,
Order order)
Display the result of a new order.
|
void |
displayOrderStatus(java.lang.Object displayData,
boolean byName,
Customer customer,
Order order,
OrderLine[] lineItems)
Display the result of an order status.
|
void |
displayPayment(java.lang.Object displayData,
java.lang.String amount,
boolean byName,
Warehouse warehouse,
District district,
Customer customer)
Display the result of a payment.
|
void |
displayScheduleDelivery(java.lang.Object displayData,
short w,
short carrier)
Display the result of a delivery schedule.
|
void |
displayStockLevel(java.lang.Object displayData,
short w,
short d,
int threshold,
int lowStock)
Display the result of a stock level.
|
protected void |
setUp() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testDelivery() |
void |
testNewOrder() |
void |
testOrderStatus()
Execute a number of order-status transactions
by name and identifier.
|
void |
testPayment() |
void |
testScheduleDelivery() |
void |
testStockLevel() |
void |
testSubmitter()
Test submitting transactions through Submitter,
as individual transactions and as a block.
|
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
private Operations ops
private OERandom rand
private final short w
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testStockLevel() throws java.lang.Exception
java.lang.Exception
public void testOrderStatus() throws java.lang.Exception
java.lang.Exception
public void testPayment() throws java.lang.Exception
java.lang.Exception
public void testNewOrder() throws java.lang.Exception
java.lang.Exception
public void testScheduleDelivery() throws java.lang.Exception
java.lang.Exception
public void testDelivery() throws java.lang.Exception
java.lang.Exception
public void displayStockLevel(java.lang.Object displayData, short w, short d, int threshold, int lowStock) throws java.lang.Exception
Display
displayStockLevel
in interface Display
displayData
- Client specific display information, such as servlet context.w
- Warehouse (input)d
- District (input)threshold
- Threshold (input)lowStock
- (result)java.lang.Exception
- Error displaying datapublic void displayOrderStatus(java.lang.Object displayData, boolean byName, Customer customer, Order order, OrderLine[] lineItems) throws java.lang.Exception
Display
displayOrderStatus
in interface Display
displayData
- Client specific display information, such as servlet context.byName
- Executed by name or by identifier.customer
- Customer for orderorder
- Order fetched.lineItems
- Items for the orderjava.lang.Exception
public void displayPayment(java.lang.Object displayData, java.lang.String amount, boolean byName, Warehouse warehouse, District district, Customer customer) throws java.lang.Exception
Display
displayPayment
in interface Display
displayData
- Client specific display information, such as servlet context.amount
- Amount of payment.byName
- Executed by name or by identifier.warehouse
- Warehouse of paymentdistrict
- District of paymentcustomer
- Customer of payment.java.lang.Exception
public void displayNewOrder(java.lang.Object displayData, Warehouse warehouse, District district, Customer customer, Order order) throws java.lang.Exception
Display
displayNewOrder
in interface Display
displayData
- Client specific display information, such as servlet context.warehouse
- Warehouse of new orderdistrict
- District of new ordercustomer
- Customer of new orderorder
- The new orderjava.lang.Exception
public void displayScheduleDelivery(java.lang.Object displayData, short w, short carrier) throws java.lang.Exception
Display
displayScheduleDelivery
in interface Display
displayData
- Client specific display information, such as servlet context.w
- Warehouse identifiercarrier
- Carrier identifierjava.lang.Exception
public void testSubmitter() throws java.lang.Exception
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.