getActions

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

Members

Aliases

behaviour_with_property
alias behaviour_with_property = Filter!(ApplyRight!(hasOneMemberUDA, Property), behaviours)
Undocumented in source.
behaviours
alias behaviours = getAllActions!T
Undocumented in source.
getActions
alias getActions = behaviour_with_property
Undocumented in source.
getActions
alias getActions = void
Undocumented in source.

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));

Meta