26 lines
538 B
C++
26 lines
538 B
C++
#pragma once
|
|
|
|
#include <Event.h>
|
|
|
|
#include <jtest/Test.hpp>
|
|
#include <jtest/UnitLogger.hpp>
|
|
|
|
namespace jtest {
|
|
class Unit : public BasicEvent<Test>, protected UnitLogger {
|
|
using event_base = BasicEvent<Test>;
|
|
public:
|
|
Unit(const std::string& name);
|
|
public:
|
|
std::string Name();
|
|
void Invoke() override;
|
|
int TestCount() { return this->listeners.size();}
|
|
void RunAll()
|
|
{
|
|
Invoke();
|
|
}
|
|
void RunNext();
|
|
private:
|
|
std::string name;
|
|
};
|
|
}
|