Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of value based trigger parameters #550

Open
gartenriese2 opened this issue Nov 29, 2023 · 0 comments
Open

Handling of value based trigger parameters #550

gartenriese2 opened this issue Nov 29, 2023 · 0 comments

Comments

@gartenriese2
Copy link

When using value based trigger parameters, CanFire returns true by default. For example:

var valueTrigger = stateMachine.SetTriggerParameters<int>(Trigger.X);
stateMachine.Configure(State.Y).PermitIf(valueTrigger, State.Z, i => i < 5);
Assert.IsFalse(stateMachine.CanFire(Trigger.X));

The assertion fails because when no parameter is used for a trigger, the default value for the parameter type is used in PermitIf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant