customers-stores icon indicating copy to clipboard operation
customers-stores copied to clipboard

Test failed on assertion.

Open s4ndman1 opened this issue 6 years ago • 2 comments

https://github.com/spring-cloud-samples/customers-stores/blob/f8ca6d7997958fd5b33972cbba24384ed42bf4f9/rest-microservices-customers/src/test/java/example/customers/CustomerRepositoryIntegrationTest.java#L48

assertThat(repository.findById(customer.id), is(customer));

Throws an error as it returns type "java.util.Optional" instead of "example.customers.Customer" fixed it by changing assert to.

assertThat(repository.findById(customer.id).get(), is(customer));

s4ndman1 avatar Sep 09 '19 13:09 s4ndman1

Same here

leolivier avatar Mar 15 '20 17:03 leolivier

Still failing in 2021.

ahaasler avatar Apr 06 '21 08:04 ahaasler