summaryrefslogtreecommitdiff
path: root/qpid/cpp/tests/TxBufferTest.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-03-30 15:50:07 +0000
committerGordon Sim <gsim@apache.org>2007-03-30 15:50:07 +0000
commit72bca07ee53fb9476f268133f244d55d8f53d3b9 (patch)
tree6e8400200b22188899144a025ecb1a6c5922cc7b /qpid/cpp/tests/TxBufferTest.cpp
parent61c7761f005dacfc5938a4d4d25b7120a8e21620 (diff)
downloadqpid-python-72bca07ee53fb9476f268133f244d55d8f53d3b9.tar.gz
Refactored the MessageStore interface to restrict visibility of broker core from store implementations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@524139 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/tests/TxBufferTest.cpp')
-rw-r--r--qpid/cpp/tests/TxBufferTest.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/qpid/cpp/tests/TxBufferTest.cpp b/qpid/cpp/tests/TxBufferTest.cpp
index 8a9b233eb9..bd8ae3796b 100644
--- a/qpid/cpp/tests/TxBufferTest.cpp
+++ b/qpid/cpp/tests/TxBufferTest.cpp
@@ -102,22 +102,25 @@ class TxBufferTest : public CppUnit::TestCase
public:
MockTransactionalStore() : state(OPEN){}
+ std::auto_ptr<TPCTransactionContext> begin(const std::string&){
+ throw "Operation not supported";
+ }
+ void prepare(TPCTransactionContext&){
+ throw "Operation not supported";
+ }
+
std::auto_ptr<TransactionContext> begin(){
actual.push_back(BEGIN);
std::auto_ptr<TransactionContext> txn(new TestTransactionContext(this));
return txn;
}
- void commit(TransactionContext* ctxt){
+ void commit(TransactionContext& ctxt){
actual.push_back(COMMIT);
- TestTransactionContext* txn(dynamic_cast<TestTransactionContext*>(ctxt));
- CPPUNIT_ASSERT(txn);
- txn->commit();
+ dynamic_cast<TestTransactionContext&>(ctxt).commit();
}
- void abort(TransactionContext* ctxt){
+ void abort(TransactionContext& ctxt){
actual.push_back(ABORT);
- TestTransactionContext* txn(dynamic_cast<TestTransactionContext*>(ctxt));
- CPPUNIT_ASSERT(txn);
- txn->abort();
+ dynamic_cast<TestTransactionContext&>(ctxt).abort();
}
MockTransactionalStore& expectBegin(){
expected.push_back(BEGIN);