Skip to content

update matrix tests - #1297

Merged
FridaTveit merged 3 commits into
exercism:masterfrom
jssander:update-matrix
Feb 12, 2018
Merged

FridaTveit merged 3 commits into
exercism:masterfrom
jssander:update-matrix

Conversation

@jssander

@jssander jssander commented Feb 7, 2018

Copy link
Copy Markdown
Contributor

I removed all of the old matrix tests which were parameterized and added new tests matching the canonical file which are not parameterized.

I also added a version file.

Reviewer Resources:

Track Policies

@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 @jssander! 🙂 There are just a couple of minor things it would be great if you could fix 🙂

}

@Test
public void ExtractRowFromOneNumberMatrixTest() {

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.

In java method names should start with a lowercase letter 🙂

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.

Check out something like this for a couple of cool tips about Java style! 🙂

public void ExtractRowFromOneNumberMatrixTest() {
String matrixAsString = "1";
int rowIndex = 0;
int[] row = {1};

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.

A very minor thing, but I think if this is name expectedRow then it makes the test a bit easier to read 🙂


@Test
public void countColumnsTest() {
assertEquals(numberOfColumns, matrix.getColumnsCount());

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.

Since you've removed these tests you can probably simplify the referece implementation a bit by removing getColumnsCount and getRowsCount 🙂

@jssander

jssander commented Feb 9, 2018

Copy link
Copy Markdown
Contributor Author

I made the changes you requested.

@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 @jssander! 🙂

@FridaTveit
FridaTveit merged commit de71a98 into exercism:master Feb 12, 2018
hgvanpariya pushed a commit to hgvanpariya/java that referenced this pull request May 13, 2018
* update matrix tests

* updated matrix tests

* updated matrix
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