A builder for feature flag rules to be used with LDTestData. More...
#include <test_data.h>
A builder for feature flag rules to be used with LDTestData.
In the LaunchDarkly model, a flag can have any number of rules, and a rule can have any number of clauses. A clause is an individual test such as "name is 'X'". A rule matches a user if all of the rule's clauses match the user.
To start defining a rule, use one of the flag builder's matching methods such as LDFlagBuilderIfMatch. This defines the first clause for the rule. Optionally, you may add more clauses with the rule builder's methods such as LDFlagRuleBuilderAndMatch. Finally, call LDFlagRuleBuilderThenReturnBoolean or LDFlagRuleBuilderThenReturn to finish defining the rule.