Skip to content

Commit 6b708a5

Browse files
committed
Annotate test classes with the @DisplayName annotation
1 parent 4527338 commit 6b708a5

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

master-package/bonus-lessons-2020/integration-tests-rest-api/src/integration-test/kotlin/com/testwithspring/master/task/CreateNewTaskTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
2727
"/com/testwithspring/master/no-tasks-and-tags.xml"
2828
])
2929
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
30+
@DisplayName("Create a new task")
3031
class CreateNewTaskTest(
3132
@Autowired private val jdbcTemplate: NamedParameterJdbcTemplate,
3233
@Autowired private val repository: TaskRepository

master-package/bonus-lessons-2020/integration-tests-rest-api/src/integration-test/kotlin/com/testwithspring/master/task/FindAllTasksTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import org.junit.jupiter.api.extension.ExtendWith
1515
import org.springframework.beans.factory.annotation.Autowired
1616

1717
@DatabaseIntegrationTest
18+
@DisplayName("Find all tasks")
1819
class FindAllTasksTest(@Autowired private val repository: TaskRepository) {
1920

2021
@Nested
@@ -24,7 +25,8 @@ class FindAllTasksTest(@Autowired private val repository: TaskRepository) {
2425
"/com/testwithspring/master/no-tasks-and-tags.xml"
2526
])
2627
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
27-
inner class WhenNoTasksIsFound {
28+
@DisplayName("When no tasks are found")
29+
inner class WhenNoTasksAreFound {
2830

2931
@Test
3032
@DisplayName("Should return an empty list")
@@ -42,6 +44,7 @@ class FindAllTasksTest(@Autowired private val repository: TaskRepository) {
4244
"/com/testwithspring/master/tasks.xml"
4345
])
4446
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
47+
@DisplayName("When two tasks are found")
4548
inner class WhenTwoTasksAreFound {
4649

4750
@Test

master-package/bonus-lessons-2020/integration-tests-rest-api/src/integration-test/kotlin/com/testwithspring/master/task/FindTaskByIdTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired
2121
"/com/testwithspring/master/tasks.xml"
2222
])
2323
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
24+
@DisplayName("Find the information of a task by using its id as search criteria")
2425
class FindTaskByIdTest(@Autowired private val repository: TaskRepository) {
2526

2627
@Nested
@@ -30,6 +31,7 @@ class FindTaskByIdTest(@Autowired private val repository: TaskRepository) {
3031
"/com/testwithspring/master/tasks.xml"
3132
])
3233
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
34+
@DisplayName("When the requested task isn't found")
3335
inner class WhenNoTaskIsFound {
3436

3537
@Test
@@ -47,6 +49,7 @@ class FindTaskByIdTest(@Autowired private val repository: TaskRepository) {
4749
"/com/testwithspring/master/tasks.xml"
4850
])
4951
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
52+
@DisplayName("When the requested task is found")
5053
inner class WhenTaskIsFound {
5154

5255
@Test

master-package/bonus-lessons-2020/integration-tests-rest-api/src/integration-test/kotlin/com/testwithspring/master/user/FindPersonInformationByUserIdTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import org.springframework.test.context.TestExecutionListeners
2828
"/com/testwithspring/master/no-tasks-and-tags.xml"
2929
])
3030
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
31+
@DisplayName("Find the person information of a person by using user id as search criteria")
3132
class FindPersonInformationByUserIdTest(@Autowired private val personFinder: PersonFinder) {
3233

3334
@Test

master-package/bonus-lessons-2020/integration-tests-rest-api/src/integration-test/kotlin/com/testwithspring/master/user/LoadUserByUsernameTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException
2323
"/com/testwithspring/master/no-tasks-and-tags.xml"
2424
])
2525
@DbUnitConfiguration(dataSetLoader = ReplacementDataSetLoader::class)
26+
@DisplayName("Load user by using username as search criteria")
2627
class LoadUserByUsernameTest(@Autowired private val userDetailsService: UserDetailsService) {
2728

2829
@Test

0 commit comments

Comments
 (0)