NCBI C++ ToolKit
|
Mock object which implements the BlastSeqSrc interface for testing purposes. More...
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | IMockBlastSeqSrc |
Abstract base class which defines a common interface for mock BlastSeqSrc objects to implement. More... | |
struct | CAlwaysFailMockBlastSeqSrc |
Mock BlastSeqSrc implementation which always fails. More... | |
class | CRandomlyFailMockBlastSeqSrc |
Mock BlastSeqSrc implementation which fails randomly. More... | |
Enumerations | |
enum | EMockBlastSeqSrcMode { eMBSS_AlwaysFail , eMBSS_RandomlyFail , eMBSS_Invalid } |
Functions | |
BlastSeqSrc * | MockBlastSeqSrcInit (EMockBlastSeqSrcMode mode=eMBSS_AlwaysFail) |
Mock BlastSeqSrc initialization function. More... | |
Mock object which implements the BlastSeqSrc interface for testing purposes.
Definition in file seqsrc_mock.hpp.
enum EMockBlastSeqSrcMode |
Enumerator | |
---|---|
eMBSS_AlwaysFail | returns failure on all operations |
eMBSS_RandomlyFail | returns failure randomly on operations |
eMBSS_Invalid | Sets a limit on the number of valid mock modes. |
Definition at line 40 of file seqsrc_mock.hpp.
BlastSeqSrc* MockBlastSeqSrcInit | ( | EMockBlastSeqSrcMode | mode = eMBSS_AlwaysFail | ) |
Mock BlastSeqSrc initialization function.
Definition at line 314 of file seqsrc_mock.cpp.
References BlastSeqSrcNew(), BlastSeqSrcNewInfo::constructor, BlastSeqSrcNewInfo::ctor_argument, NULL, and s_MockBlastSeqSrcNew().
Referenced by BOOST_AUTO_TEST_CASE(), FailingMockSeqSrcTestFixture::FailingMockSeqSrcTestFixture(), and RandomlyFailingMockSeqSrcTestFixture::RandomlyFailingMockSeqSrcTestFixture().