Skip to content

Commit

Permalink
add remove() method test with index on list
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Furlaneto <lucasfurlaneto.s@gmail.com>
  • Loading branch information
furlaneto committed Feb 8, 2018
1 parent 2a95dae commit 5238b22
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -99,6 +99,17 @@ public void shouldRemoveAll() {
assertThat(fruits, contains(waterMelon));
}

@Test
public void shouldRemoveWithIndex() {
fruits.add(orange);
fruits.add(banana);
fruits.add(waterMelon);

fruits.remove(0);
assertTrue(fruits.size() == 2);
assertThat(fruits, not(contains(orange)));
}

@Test
public void shouldReturnIndexOf() {
fruits.add(new ProductCart("orange", BigDecimal.ONE));
Expand Down

0 comments on commit 5238b22

Please sign in to comment.