10000 Added controller smoke test · Sacm89-Code/hello-spring-testing@84cbd2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 84cbd2d

Browse files
author
Javier Arturo Rodriguez
committed
Added controller smoke test
1 parent 14a2990 commit 84cbd2d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.example.hellospring
2+
3+
import org.junit.jupiter.api.Test
4+
import org.springframework.beans.factory.annotation.Autowired
5+
import org.springframework.boot.test.context.SpringBootTest
6+
import static org.assertj.core.api.Assertions.*
7+
8+
9+
@SpringBootTest
10+
class SmokeTest {
11+
12+
@Autowired
13+
private HomeController controller
14+
15+
@Test
16+
void contextLoads() {
17+
// assert controller!=null
18+
assertThat(controller).isNotNull()
19+
}
20+
21+
22+
}

0 commit comments

Comments
 (0)
0