Reduce Duplication between ACMachineTest and MachineTest
- Dominant language
- Java
- Stars
- 615
- Forks
- 82
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Description
Tracking ticket to follow up on https://github.com/aws/event-ruler/pull/82#discussion_r1154645620
> What I have been doing recently is added rulesForJSONEvent tests to ACMachineTest and adding rulesForEvent tests (otherwise identical) to MachineTest. I think that is the intended difference between the two test classes? So change this and add a version to ACMachineTest? Of course, we should probably think through a path forward to stop duplicating all tests.
Need to
* combine tests cases (some are missing from ACMachineTest and others are lacking in MachineTest)
* build a wrapper method to call both `rulesForJSONEvent` and `rulesForEvent`
* handle cases when both should be returning different results for Array Consistency.
Contributor guide
Research direction
Start by comparing ACMachineTest and MachineTest, focusing on the existing rulesForJSONEvent and rulesForEvent tests and the Array Consistency cases. Review the linked pull request discussion for context, then determine how shared test cases and a wrapper should cover both methods while preserving cases with different expected results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100