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

Added new test cases for assertThrowsRefactoring #851

Closed

Conversation

victorgveloso
Copy link
Contributor

This PR introduces a series of updates to improve testing and coverage for statement mappings in the test suite.
Key Changes

  • Refactor TestStatementMappings.java
    • Enhanced the structure and readability of the file for better test reporting and maintainability.
  • Add TestRelatedStatementMappingsTest.java
    • A new test class dedicated to gradually adding and evaluating supported test refactorings.

Current Status

  • Two test cases are currently failing:
    • problem-1b987b88ecb5cc2c8df58ac8eda188fb2d6f5998
    • disruptor-340f23ef88a32ceb8341820c15bfd9537303219c
  • Some test cases corresponding to unsupported refactoring variants have been commented out for now.

Next Steps

  • Investigate and address the failures of the two test cases.
  • Expand the implementation to support additional refactoring variants and enable the commented-out cases in future updates.

Checklist

  • Refactor TestStatementMappings.java
  • Add TestRelatedStatementMappingsTest.java with initial cases
  • Fix failing cases
  • Add support for additional refactoring variants

…est refactorings are gradually added

Currently 2 cases fail (problem-1b987b88ecb5cc2c8df58ac8eda188fb2d6f5998 and disruptor-340f23ef88a32ceb8341820c15bfd9537303219c)
Commented out cases correspond to refactoring variants not supported yet
@tsantalis
Copy link
Owner

@victorgveloso
There are tests failing in TestStatementMappings
Please undo this Assertions.assertIterableEquals(expected, actual)
The previous assertion is not testing for equality, instead uses containsAll()
This is done on purpose, because the order of the mappings may change (and has changed) as the tool evolves.

@victorgveloso
Copy link
Contributor Author

victorgveloso commented Jan 17, 2025

Alright.

EDIT:

New commits revert to old assertion strategy but improves the test report by extracting assertion utility method assertHasSameElementsAs.

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

Successfully merging this pull request may close these issues.

2 participants