getActions

This template get the action with the behaviour-Property from a Behaviour object

@safe
template getActions (
T
Property
) if (
is(T == class) ||
is(T == struct)
) {}

Return Value

The function with the behaviour-Property The function fails if there is more than one behaviour with this behaviour and returns void if no behaviour-Property has been found

Examples

alias behaviour_with_given = getActions!(BehaviourUnittest.Some_awesome_feature, Given);
static assert(allSatisfy!(isCallable, behaviour_with_given));

static assert(allSatisfy!(ApplyRight!(hasOneMemberUDA, Given), behaviour_with_given));
static assert(is(getActions!(BehaviourUnittest.Some_awesome_feature_bad_format_missing_given, Given) == void));

alias behaviour_with_when = getActions!(BehaviourUnittest.Some_awesome_feature, When);
static assert(isCallable!(behaviour_with_when));
static assert(hasOneMemberUDA!(behaviour_with_when, When));