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 JUnit Testcases to the languagetool repo #9648

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pawsitive-pc
Copy link

Rootcause: Some of the Java files have 0% branch cause their respective JUnit files werent added.

Fix: Added some JUnit testcases to increase the branch coverage overall.

Rootcause: Some of the Java files have 0% branch cause their respective
JUnit files werent added.

Fix: Added some JUnit testcases to increase the branch coverage overall.
@@ -0,0 +1,62 @@
package org.languagetool;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the standard license header we use? (With your name as the copyright holder?)


public class GlobalConfigTest {

/* This tests the equals method */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment isn't really necessary

// When both objects have the same server, their hash codes should be equal again.
assertEquals(config1.hashCode(), config2.hashCode());

config1.setBeolingusFile(new File("file1"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use a different property? beoLingus isn't used anymore and might soon be removed


@Test
public void testHashCode() {
// Create a SentenceRange object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments are not needed

dateHelper = new YMDDateHelper();
}

/* This checks the "parseData" method */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comments that don't provide value

pawsitive-pc and others added 2 commits November 26, 2023 23:28
Rootcause: Some design and/or implementation smells were not fixed. This
was found as part while running the designite tool.

Fix: Used refactoring techniques like Pull-up method, Introduce
explaining variable, Decompose conditional, Extract method and
rename variable to fix a few
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