54 TODO (
"more advice usage scenarios.....?");
62 Request<int> generic{
"solution(life_and_universe_and_everything)"};
63 CHECK (0 == generic.getAdvice());
65 Provision<int> universal{
"solution(life_and_universe_and_everything)"};
67 CHECK (5 == generic.getAdvice());
69 universal.retractAdvice();
70 CHECK (0 == generic.getAdvice());
79 CHECK (not request.isMatched());
83 CHECK (request.isMatched());
84 CHECK (55 == request.getAdvice());
87 CHECK (not request.isMatched());
96 CHECK (not info.isGiven());
99 CHECK (0 == question.getAdvice());
100 CHECK (not question.isMatched());
102 auto publish = [&](
int i)
104 if (not info.isGiven())
108 for (
uint i=0; i<5; ++i)
112 CHECK (1 == question.getAdvice());
113 CHECK (question.isMatched());
115 info.retractAdvice();
116 CHECK (not info.isGiven());
117 CHECK (not question.isMatched());
124 check_SevenMoreWondersOfTheWorld()
126 UNIMPLEMENTED (
"suitable advice to save the world");
Expecting Advice and giving Advice: a cross-cutting collaboration of loosely coupled participants.
Access point for the advising entity (server).
void setAdvice(AD const &pieceOfAdvice)
Access point for the advised entity (client).
void pattern03_installOnlyOnce()
void pattern02_pickIfPresent()
void pattern01_justPickAndBeHappy()
Lumiera public interface.
Test runner and basic definitions for tests.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)