Skip to content

Update PrimeFactorsCalculatorTest - #1308

Merged
FridaTveit merged 3 commits into
exercism:masterfrom
LuLechuan:Update_prime_factors
Feb 12, 2018
Merged

FridaTveit merged 3 commits into
exercism:masterfrom
LuLechuan:Update_prime_factors

Conversation

@LuLechuan

Copy link
Copy Markdown
Contributor

Fixes #1293
For exercise: prime-factors


Reviewer Resources:

Track Policies

public void test() {
assertEquals(expectedOutput, new PrimeFactorsCalculator().calculatePrimeFactorsOf(input));
public void testGeneral() {
assertEquals(Arrays.asList(3L, 3L), primeFactorsCalculator.calculatePrimeFactorsOf(9L));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might make more sense to separate each of these assertEquals statements into individual tests. What do we think @exercism/java? 🙂

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great @LuLechuan! I only have one suggestion for the test names apart from that it looks ready to merge! 🙂


@Ignore("Remove to run test")
@Test
public void testSingleTonListResult() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The canonical data has some good suggestions for tests names (e.g. testPrimeNumber for this one) which is might be good to use? We don't have to use the same test names as the canonical data but in this case they explain why these numbers have been chosen which might be useful 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh I didn't notice that! Thanks for the advice!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No problem! 🙂

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great! Thanks for doing this @LuLechuan! 🙂

@FridaTveit
FridaTveit merged commit c5f7350 into exercism:master Feb 12, 2018
hgvanpariya pushed a commit to hgvanpariya/java that referenced this pull request May 13, 2018
* Update PrimeFactorsCalculatorTest

* Separate tests individually

* update tests
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.

3 participants