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

Support for ending execution of a unit test in a mock #237

Open
Rune-Christensen opened this issue Sep 28, 2022 · 0 comments
Open

Support for ending execution of a unit test in a mock #237

Rune-Christensen opened this issue Sep 28, 2022 · 0 comments

Comments

@Rune-Christensen
Copy link
Collaborator

We have a testscenario, where we want to mock a section that performs a goback, but the functionality of the goback needs to be preserved, to avoid bad tests.
Example:
EXAMPLE SECTION. PERFORM DO-SOMETHING IF DO-SOMETHING-WENT-BAD PERFORM SECTION-WITH-GOBACK END-IF PERFORM DO-SOMETHING-MORE .
If I create a test of example section, and make sure that we enter the SECTION-WITH-GOBACK, we want to mock that section, so we do not goback, but we want to exit the testcase, because we do not want to perform the section do-something-more, as that would not normally be executed.

This could of course be fixed with a little bit of refactoring, but I also know of many who use this syntax.

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