Skip to content

Commit

Permalink
t extract variable
Browse files Browse the repository at this point in the history
  • Loading branch information
isidore committed May 17, 2023
1 parent 058e234 commit 1b2e8ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public void testOnlyAvailableItemsAreReserved()
Item missing_item = new Item("W202", "Item not Found", 2);
Item sold_out_item = new Item("S303", "SuperPopularGame", 0);
MockSaver<Item> saver = new MockSaver<>();
reserveItems(Arrays.asList(milk.id, missing_item.id, sold_out_item.id),
() -> new Item[]{milk, sold_out_item}, saver);
List<String> reservedIds = Arrays.asList(milk.id, missing_item.id, sold_out_item.id);
reserveItems(reservedIds, () -> new Item[]{milk, sold_out_item}, saver);
// Only reserved milk
Assert.assertArrayEquals(saver.saved.toArray(), new Item[]{milk});
}
Expand Down

0 comments on commit 1b2e8ff

Please sign in to comment.