Conversation
PR SummaryThis PR adds a Singleton class and its corresponding test file. The Singleton class demonstrates the singleton design pattern, ensuring only one instance of the class exists. The test file verifies the singleton implementation and its functionality. Changes
autogenerated by presubmit.ai |
There was a problem hiding this comment.
🚨 Pull request needs attention.
Review Summary
Commits Considered (1)
- a924177: Add files via upload
Files Processed (12)
- visitor/src/main/java/Singleton.java (1 hunk)
- visitor/src/test/java/com/iluwatar/visitor/SingletonTest.java (1 hunk)
- visitor/target/classes/Singleton.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/App.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/Commander.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/CommanderVisitor.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/Sergeant.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/SergeantVisitor.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/Soldier.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/SoldierVisitor.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/Unit.class (0 hunks)
- visitor/target/classes/com/iluwatar/visitor/UnitVisitor.class (0 hunks)
Actionable Comments (1)
-
visitor/src/test/java/com/iluwatar/visitor/SingletonTest.java [21-23]
bug: "Incorrect assertion method used."
Skipped Comments (0)
Comment on lines
+21
to
+23
| private void assertSame(Singleton instance1, Singleton instance2, String s) { | ||
| } | ||
| } |
There was a problem hiding this comment.
The assertSame method in SingletonTest is not a standard JUnit assertion. Replace it with assertEquals or assertSame from JUnit's assertion library.
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 Template
What does this PR do?