Skip to content

series: change return type of 'slices' method #1598 - #1599

Merged
FridaTveit merged 1 commit into
exercism:masterfrom
hgvanpariya:series_multilist
Oct 11, 2018
Merged

FridaTveit merged 1 commit into
exercism:masterfrom
hgvanpariya:series_multilist

Conversation

@hgvanpariya

Copy link
Copy Markdown
Contributor

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.

Looks great @hgvanpariya! 🙂 I've added a few comments, let me know if you have any questions 🙂

Series series = new Series("35");
List<List<String>> expected = Arrays.asList(Arrays.asList("3", "5"));
List<List<String>> actual = series.slices(2);
List<String> expected = Arrays.asList("3", "5");

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.

I think this should be "35" which is why the build is failing 🙂

);
List<List<String>> actual = series.slices(3);
List<String> actual = series.slices(3);
assertEquals(expected, actual);

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 two lines above appear to be indented four spaces too much? 🙂

expectedException.expectMessage("Slice size is too big.");
Series series = new Series("");
List<List<String>> slices = series.slices(1);
List<String> slices = series.slices(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.

You don't need to store the slices in a variable since you're not using it 🙂

Series series = new Series("1");
List<List<String>> expected = Arrays.asList(Arrays.asList("1"));
List<List<String>> actual = series.slices(1);
List<String> expected = Arrays.asList("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.

This could use Collections.singletonList 🙂

Arrays.asList("2")
);
List<List<String>> actual = series.slices(1);
List<String> expected = Arrays.asList("1","2");

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.

Please add a space after the comma 🙂

@hgvanpariya

Copy link
Copy Markdown
Contributor Author

@FridaTveit : I fixed the issues reported ... please let me know any further changes are needed ...

@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.

Looks great, thanks @hgvanpariya! 😄

@FridaTveit
FridaTveit merged commit c2ca198 into exercism:master Oct 11, 2018
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