12/06/23 Given-When-Then
2023. 6. 12. 23:21ㆍ카테고리 없음
Given-When-Then is a style of representing tests. The essential idea is to break down writing a scenario (or test) into three sections:
- The given part describes the state of the world before you begin the behavior you're specifying in this scenario. You can think of it as the pre-conditions to the test.
- The when section is that behavior that you're specifying.
- Finally the then section describes the changes you expect due to the specified behavior

Spring Boot offers tools and annotations for tests. These are included in the spring-boot-starter-test pacakge. Here are the list of these tools:
- JUnit
- Spring Test & Spring Boot Test
- AssertJ
- Hamcrest
- Mockito
- JSONassert
- JsonPath
bliki: GivenWhenThen
a bliki entry for GivenWhenThen
martinfowler.com