63 TODO (
"more advice usage scenarios.....?");
71 Request<int> generic{
"solution(life_and_universe_and_everything)"};
72 CHECK (0 ==
generic.getAdvice());
74 Provision<int> universal{
"solution(life_and_universe_and_everything)"};
75 universal.setAdvice(5);
76 CHECK (5 ==
generic.getAdvice());
78 universal.retractAdvice();
79 CHECK (0 ==
generic.getAdvice());
88 CHECK (not request.isMatched());
92 CHECK (request.isMatched());
93 CHECK (55 == request.getAdvice());
96 CHECK (not request.isMatched());
105 CHECK (not info.isGiven());
108 CHECK (0 == question.getAdvice());
109 CHECK (not question.isMatched());
111 auto publish = [&](
int i)
113 if (not info.isGiven())
117 for (uint i=0; i<5; ++i)
121 CHECK (1 == question.getAdvice());
122 CHECK (question.isMatched());
124 info.retractAdvice();
125 CHECK (not info.isGiven());
126 CHECK (not question.isMatched());
133 check_SevenMoreWondersOfTheWorld()
135 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...
Simple test class runner.
Lumiera public interface.
void pattern03_installOnlyOnce()