File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 77import org .springframework .boot .test .context .SpringBootTest ;
88import org .springframework .jdbc .core .JdbcTemplate ;
99import org .springframework .test .annotation .DirtiesContext ;
10+ import roomescape .controller .ReservationController ;
1011import roomescape .model .Reservation ;
1112
1213import static org .assertj .core .api .Assertions .assertThat ;
1314
15+ import java .lang .reflect .Field ;
1416import java .sql .Connection ;
1517import java .sql .SQLException ;
1618import java .util .HashMap ;
@@ -62,4 +64,21 @@ public class MissionStepTest {
6264 .then ().log ().all ()
6365 .statusCode (400 );
6466 }
67+
68+ @ Autowired
69+ private ReservationController reservationController ;
70+
71+ @ Test
72+ void 십단계 () {
73+ boolean isJdbcTemplateInjected = false ;
74+
75+ for (Field field : reservationController .getClass ().getDeclaredFields ()) {
76+ if (field .getType ().equals (JdbcTemplate .class )) {
77+ isJdbcTemplateInjected = true ;
78+ break ;
79+ }
80+ }
81+
82+ assertThat (isJdbcTemplateInjected ).isFalse ();
83+ }
6584}
You can’t perform that action at this time.
0 commit comments