spring-cloud-samples / customers-stores

Two microservices for customers and stores
431 stars 309 forks source link

Test failed on assertion. #36

Open s4ndman1 opened 5 years ago

s4ndman1 commented 5 years ago

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));

leolivier commented 4 years ago

Same here

ahaasler commented 3 years ago

Still failing in 2021.