Skip to content

Commit

Permalink
test: update and enhance basic iterable entity template
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Jan 15, 2025
1 parent fcb4539 commit f87f5cd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ void shouldUpdateIterablePerson(List<Person> entities) {

Iterable<Person> people = template.insert(entities);
var updatedEntities = StreamSupport.stream(people.spliterator(), false)
.peek(p -> {
p.setName(p.getName() + "updated");
}).toList();
.peek(p -> p.setName(p.getName() + "updated")).toList();
Iterable<Person> result = template.update(updatedEntities);
SoftAssertions.assertSoftly(soft -> {
soft.assertThat(result).hasSize(entities.size());
Expand All @@ -93,9 +91,7 @@ void shouldUpdateIterableVehicle(List<Vehicle> entities) {

Iterable<Vehicle> vehicles = template.insert(entities);
var updatedEntities = StreamSupport.stream(vehicles.spliterator(), false)
.peek(v -> {
v.setModel(v.getModel() + "updated");
}).toList();
.peek(v -> v.setModel(v.getModel() + "updated")).toList();

Iterable<Vehicle> result = template.update(updatedEntities);
SoftAssertions.assertSoftly(soft -> {
Expand Down

0 comments on commit f87f5cd

Please sign in to comment.