Utils::CalitkoMocks::Testing::CallDriverTest Class Reference

Inherits TestFixture.

Inheritance diagram for Utils::CalitkoMocks::Testing::CallDriverTest:

Inheritance graph
[legend]
Collaboration diagram for Utils::CalitkoMocks::Testing::CallDriverTest:

Collaboration graph
[legend]
List of all members.

Detailed Description

Tests for class CallDriver.

Todo:
Should we test the Msg function variants?

Test willEmit()

Definition at line 39 of file CallDriverTest.cpp.

Public Types

typedef BoundFunction< CallDriverTest,
int(int)> 
fooType
typedef BoundFunction< CallDriverTest,
void(int)> 
foo2Type

Public Member Functions

int foo (int a)
void testWillReturnOk ()
 Verify that willReturn() invokes the BoundFunction.
void testWillReturnFail ()
 Verify that willReturn() checks the retrun value of the BoundFunction.
void testBoundFooWillCallNotCheckedFail ()
 BoundFunctions should verify the registered ExpectedFunctions.
void foo2 (int a)
void testReturnsOk ()
 Verify that willReturnVoid() invokes the BoundFunction.
void testWillCallOk ()
 willCall() should return an ExpectationDriver (compile-time check).
void testReturnsNotCalled ()
 Throw if neither returns() nor willReturn() has been called.
void testMultipleChainedWillCallOk ()
 Verify that expectations specified within a single method chain.

Public Attributes

bool fooOk
bool foo2Ok

Private Member Functions

 CPPUNIT_TEST_SUITE (CallDriverTest)
 CPPUNIT_TEST (testWillReturnOk)
 CPPUNIT_TEST_FAIL (testWillReturnFail)
 CPPUNIT_TEST_FAIL (testBoundFooWillCallNotCheckedFail)
 CPPUNIT_TEST (testReturnsOk)
 CPPUNIT_TEST (testWillCallOk)
 CPPUNIT_TEST (testReturnsNotCalled)
 CPPUNIT_TEST (testMultipleChainedWillCallOk)
 CPPUNIT_TEST_SUITE_END ()


Member Typedef Documentation

typedef BoundFunction<CallDriverTest, void (int)> Utils::CalitkoMocks::Testing::CallDriverTest::foo2Type
 

Definition at line 96 of file CallDriverTest.cpp.

typedef BoundFunction<CallDriverTest, int (int)> Utils::CalitkoMocks::Testing::CallDriverTest::fooType
 

Definition at line 54 of file CallDriverTest.cpp.


Member Function Documentation

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST testMultipleChainedWillCallOk   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST testReturnsNotCalled   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST testWillCallOk   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST testReturnsOk   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST testWillReturnOk   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST_FAIL testBoundFooWillCallNotCheckedFail   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST_FAIL testWillReturnFail   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST_SUITE CallDriverTest   )  [private]
 

Utils::CalitkoMocks::Testing::CallDriverTest::CPPUNIT_TEST_SUITE_END  )  [private]
 

int Utils::CalitkoMocks::Testing::CallDriverTest::foo int  a  )  [inline]
 

Definition at line 53 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::foo2 int  a  )  [inline]
 

Definition at line 95 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testBoundFooWillCallNotCheckedFail  )  [inline]
 

BoundFunctions should verify the registered ExpectedFunctions.

Since the attached expectation is not check()'ed, the test should fail if its verifyChecked() is called by the underlying BoundFunction.

Definition at line 80 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testMultipleChainedWillCallOk  )  [inline]
 

Verify that expectations specified within a single method chain.

Definition at line 140 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testReturnsNotCalled  )  [inline]
 

Throw if neither returns() nor willReturn() has been called.

Definition at line 125 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testReturnsOk  )  [inline]
 

Verify that willReturnVoid() invokes the BoundFunction.

Definition at line 98 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testWillCallOk  )  [inline]
 

willCall() should return an ExpectationDriver (compile-time check).

Definition at line 108 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testWillReturnFail  )  [inline]
 

Verify that willReturn() checks the retrun value of the BoundFunction.

Definition at line 67 of file CallDriverTest.cpp.

void Utils::CalitkoMocks::Testing::CallDriverTest::testWillReturnOk  )  [inline]
 

Verify that willReturn() invokes the BoundFunction.

Definition at line 57 of file CallDriverTest.cpp.


Member Data Documentation

bool Utils::CalitkoMocks::Testing::CallDriverTest::foo2Ok
 

Definition at line 94 of file CallDriverTest.cpp.

bool Utils::CalitkoMocks::Testing::CallDriverTest::fooOk
 

Definition at line 52 of file CallDriverTest.cpp.


The documentation for this class was generated from the following file: