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

Mock class and implement custom polling test #163

Merged
merged 4 commits into from
Sep 5, 2023
Merged

Mock class and implement custom polling test #163

merged 4 commits into from
Sep 5, 2023

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Sep 1, 2023

This PR verifies that the child class always have the last word when we are polling, and can signal what should be the result.

It adds 6 new tests for the different outcomes of pollValidate:

image

The tests were a bit repetitive, so for this one i created a shared function. After all, i just want to test for all case, the poll will respect what the pollValidate says, so i just want to see it handles expectations, and all the result codes.

Note that I had to extend the test order class to be able to override and mock pollValidate (its protected, which makes it harder to mock)

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
@mfw78
@anxolin
You can retrigger this bot by commenting recheck in this Pull Request

@anxolin anxolin marked this pull request as draft September 1, 2023 15:43
@anxolin anxolin requested review from a team and mfw78 September 1, 2023 15:58
@anxolin anxolin marked this pull request as ready for review September 1, 2023 15:59
@anxolin anxolin changed the base branch from is-valid to main September 1, 2023 16:11
@anxolin anxolin merged commit c0cb55f into main Sep 5, 2023
5 of 6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2023
@alfetopito alfetopito deleted the poll-validate branch September 5, 2023 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants