Skip to content

Unit tests for /remind (and clock mocking) #396

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

Closed
Zabuzard opened this issue Feb 23, 2022 · 3 comments · Fixed by #415
Closed

Unit tests for /remind (and clock mocking) #396

Zabuzard opened this issue Feb 23, 2022 · 3 comments · Fixed by #415
Assignees
Labels
enhancement New feature or request priority: normal valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.

Comments

@Zabuzard
Copy link
Member

Overview

The /remind command should be covered by unit tests.

This requires clock mocking though, which we should introduce with this as well.

Hints

Fortunately, Java is well equipped for clock mocking. Its just that it requires a change on all time usages in the whole code base. Like, instead of Instant.now(), you would write Instant.now(clock). And then you need to provide a clock at an accessible place that you can mock (similar to Config for example).

@Zabuzard Zabuzard added enhancement New feature or request blocked This issue is currently blocked by another issue (see comments) labels Feb 23, 2022
@Zabuzard Zabuzard added this to the Improvement phase 1 milestone Feb 23, 2022
@Zabuzard
Copy link
Member Author

Naturally blocked by #373

@Zabuzard Zabuzard mentioned this issue Feb 23, 2022
6 tasks
@Zabuzard Zabuzard removed the blocked This issue is currently blocked by another issue (see comments) label Feb 24, 2022
@Zabuzard
Copy link
Member Author

unblocked, pr has been merged.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

@github-actions github-actions bot added stale inactivity-closed Issues that have been closed due to inactivity, but are otherwise valid and might be reopened later labels Apr 15, 2022
@Zabuzard Zabuzard reopened this Apr 25, 2022
@Zabuzard Zabuzard added valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board. and removed inactivity-closed Issues that have been closed due to inactivity, but are otherwise valid and might be reopened later stale labels Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: normal valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant