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)"};
66 universal.setAdvice(5);
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");
void pattern01_justPickAndBeHappy()
void pattern02_pickIfPresent()
Expecting Advice and giving Advice: a cross-cutting collaboration of loosely coupled participants...
Simplistic test class runner.
Lumiera public interface.
void pattern03_installOnlyOnce()