Fix(tests): Rename MicroSwitchHelperTests file to .java - #404
Merged
Conversation
Ankita562
force-pushed
the
fix/rename-test-file-401
branch
from
October 18, 2025 06:04
dc32698 to
7af9139
Compare
leandrumartin
approved these changes
Oct 19, 2025
Collaborator
|
Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Summary:
This PR fixes the MicroSwitchHelperTests file. The file was not being executed by the build system because it was missing the .java extension, and it also contained a compilation error.
This fix addresses both issues, allowing the test suite to run successfully and validate the MicroSwitchHelper class. The changes were verified by running the ./gradlew test command and confirming that all tests pass.
PR Checklist:-
[x] Closes #401
[x] Tests pass
[x] No documentation changes were required for this fix.
Detailed Description
There were two main issues addressed in this pull request:
1.Incorrect Filename: The test file was named MicroSwitchHelperTests instead of MicroSwitchHelperTests.java. I renamed the file so that the Gradle build system would recognize and compile it.
2.Static Context Error: After renaming the file, a compilation error was revealed: non-static method addEventListener cannot be referenced from a static context. I corrected this on line 56 by changing the static call from MicroSwitchHelper.addEventListener(...) to an instance call using the existing object: microSwitchHelper.addEventListener(...).
With these changes, the build is now successful.