Last active
March 3, 2020 17:52
-
-
Save pawelpluta/fbd7d38832d57b070f4a1a4394bd72b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerRepositoryTcLibraryIT extends Specification { | |
/* setup */ | |
def "should be able to retrieve saved customer"() { | |
given: | |
CustomerId customerId = randomCustomerId() | |
Customer customer = customerForA(customerId) | |
and: | |
customerRepository.save(customer) | |
when: | |
Optional<Customer> foundCustomer = customerRepository.findById(customerId) | |
then: | |
foundCustomer.isPresent() | |
foundCustomer.get() == customer | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment