summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestDecoratorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cppunittest/TestDecoratorTest.cpp')
-rw-r--r--examples/cppunittest/TestDecoratorTest.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/cppunittest/TestDecoratorTest.cpp b/examples/cppunittest/TestDecoratorTest.cpp
index 0bf17fd..8ff257d 100644
--- a/examples/cppunittest/TestDecoratorTest.cpp
+++ b/examples/cppunittest/TestDecoratorTest.cpp
@@ -1,5 +1,4 @@
#include "ExtensionSuite.h"
-#include "FailingTestCase.h"
#include "TestDecoratorTest.h"
#include <cppunit/TestResult.h>
@@ -21,7 +20,7 @@ TestDecoratorTest::~TestDecoratorTest()
void
TestDecoratorTest::setUp()
{
- m_test = new FailingTestCase();
+ m_test = new MockTestCase( "mocktest" );
m_decorator = new CppUnit::TestDecorator( m_test );
}
@@ -37,14 +36,20 @@ TestDecoratorTest::tearDown()
void
TestDecoratorTest::testCountTestCases()
{
+ m_test->setExpectedCountTestCasesCall( 1 );
CPPUNIT_ASSERT_EQUAL( 1, m_decorator->countTestCases() );
+ m_test->verify();
}
void
TestDecoratorTest::testRun()
{
+ m_test->setExpectedSetUpCall( 1 );
+ m_test->setExpectedRunTestCall( 1 );
+ m_test->setExpectedTearDownCall( 1 );
CppUnit::TestResult result;
+
m_decorator->run( &result );
m_test->verify();
}