Add four additional unit tests#7653
Closed
nasdas-dev wants to merge 23 commits into
Closed
Conversation
FieldChange.java 18% -> 94% Abbreviation.java 63% -> 88% SuggestionProviders.java 0% -> 100%
FileHelper.java -> Boundary testing of an empty file CitationKeyGenerator.java -> Boundary testing of testlagepage parser for 0-00 & 1-1 HTMLCharacterChecker.java -> Null Value Boundary test
ParsedEntryLink.java -> Partition testing of ParsingEntryLink UpperCaseFormatter.java -> Partition testing for special characters CitationStyleCacheTest.java -> Partition testing of cache storage
SPTest typo fix
Checkstyle passed
Adjustments for @ellieMayVelasquez feedback #7543 (review)
Assertion Roulette
Added Resource Optimism
Added assertion messages to fix assertion roulette.
General Fixture, removed test code duplication
checkstyle fix
General Refactoring
not needed
Fixed AssertionRoulette, one instance of duplicated test code.
Test code duplication
Assertion Roulette fixed
fixed Assertion Roulette
using test doubles
Siedlerchr
requested changes
Apr 20, 2021
| assertEquals("foo", (LayoutEntry.parseMethodsCalls("bla(test),foo(fark)").get(1)).get(0)); | ||
| assertEquals("test", (LayoutEntry.parseMethodsCalls("bla(test),foo(fark)").get(0)).get(1)); | ||
| assertEquals("fark", (LayoutEntry.parseMethodsCalls("bla(test),foo(fark)").get(1)).get(1)); | ||
| assertEquals(1, LayoutEntry.parseMethodsCalls("bla").size(), "Parsing of layout entry method calls failed."); |
Member
There was a problem hiding this comment.
Please no comment for the assert, This is bad design. Better group this into multiple methods testing one aspect.
Member
There was a problem hiding this comment.
Even better, use ParameterizedTests!
|
|
||
| @Test | ||
| public void noKewordToMigrate() { | ||
| BibEntry entry = new BibEntry().withField(StandardField.AUTHOR, "JabRef") |
Member
There was a problem hiding this comment.
Why do you change this? withField is a a valid alternative
|
|
||
| @Test | ||
| void testEquals() { | ||
| BibEntry entry = new BibEntry(); |
Member
There was a problem hiding this comment.
We talked about this before in your other PR. No testing on equals or hashcode or toString necessary
| assertEquals("bla", (LayoutEntry.parseMethodsCalls("bla").get(0)).get(0), "Parsing of layout entry method calls failed. Input did not match expected output."); | ||
|
|
||
| assertEquals(1, LayoutEntry.parseMethodsCalls("bla,").size(), "Parsing of layout entry method calls failed. Check for comma behaviour."); | ||
| assertEquals("bla", (LayoutEntry.parseMethodsCalls("bla,").get(0)).get(0), "Parsing of layout entry method calls failed. Input did not match expected output."); |
Member
There was a problem hiding this comment.
Directly compare the content of the lists, not their size!
5 tasks
Member
|
It seems like we already have enough unit tests for that classes and here are many confilicts, so Im closing |
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.
This pull request contributes to issue #6207, which is to add more unit tests to the project.
Tests added:
AppendWordsStrategyTest
ChangeScannerTest
NewEntryActionTest
FileHistoryMenuTest
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)