-
Notifications
You must be signed in to change notification settings - Fork 0
Async steps
Michael W Powell edited this page Dec 8, 2020
·
1 revision
xWellBehaved.net provides the ability to define asynchronous steps using the async
and await
keywords.
[Scenario]
public void Addition(int x, int y, AsyncCalculator calculator, int answer)
{
"Given the number 1".x(() => x = 1);
"And the number 2".x(() => y = 2);
"And an asynchronous calculator".x(() => calculator = new AsyncCalculator());
"When I add the numbers together".x(async () => answer = await calculator.AssertNull().Add(x, y));
"Then the answer is 3".x(() => answer.AssertEquals(3));
}
- Home
- Quick start
-
Documentation
- Writing scenarios
- Running scenarios
- Package dependencies
- Debugging scenarios
- Assertions
- Step names
- Debugging Scenarios with examples
- Background methods
- TearDown methods
- Async steps
- Object disposal
- Rollback
- Skipping steps and scenarios
- Step metadata
- Continuing on failure
- Step filters
- Changes in xBehave.net version 2.0
- Changes since deriving from xBehave.net
- Extending xWellBehaved.net
- FAQ
- Known Issues
- Contributions