Skip to content

Commit 6bbfd0e

Browse files
committed
find max order by price test fix
1 parent 4fcbce5 commit 6bbfd0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/groovy/customer/CustomerTest.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ class CustomerTest extends Specification {
8686

8787
when:
8888
def maxOrderOptional = customer.findOrderWithMaxPrice()
89-
89+
9090
then:
91-
maxOrderOptional == Optional.of(orders.max { it.price })
91+
maxOrderOptional == Optional.ofNullable(orders.findAll { it.hasPrice() }.max { it.price })
9292
}
9393

9494
def "test findOrderWithMaxPrice - empty orders"() {

0 commit comments

Comments
 (0)