mirror of
https://github.com/resiprocate/resiprocate.git
synced 2026-01-12 00:05:02 +08:00
git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@8966 ddefafc4-47db-0310-ae44-fa13212b10f2
42 lines
1012 B
C++
42 lines
1012 B
C++
#if !defined EndPoint_hxx
|
|
#define EndPoint_hxx
|
|
|
|
#include "tfm/TestEndPoint.hxx"
|
|
#include "tfm/Expect.hxx"
|
|
#include "tfm/WrapperEvent.hxx"
|
|
|
|
class ExpectPredicate;
|
|
|
|
class EndPoint : public TestEndPoint
|
|
{
|
|
public:
|
|
virtual ~EndPoint();
|
|
|
|
void handleEvent(Event* eventRaw);
|
|
|
|
// Standard expects
|
|
template<class T>
|
|
ExpectBase* expect(int timeoutMs, ActionBase* expectAction)
|
|
{
|
|
return new Expect(*this,
|
|
new WrapperEventMatcher<T>,
|
|
timeoutMs,
|
|
expectAction);
|
|
}
|
|
|
|
template<class T>
|
|
ExpectBase* expect(ExpectPredicate* pred, int timeoutMs, ActionBase* expectAction)
|
|
{
|
|
return new Expect(*this,
|
|
new WrapperEventMatcher<T>,
|
|
pred,
|
|
timeoutMs,
|
|
expectAction);
|
|
}
|
|
|
|
protected:
|
|
virtual void clean();
|
|
};
|
|
|
|
#endif
|