File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-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 .Reservation ;
1112
13+ import java .lang .reflect .Field ;
1214import java .sql .Connection ;
1315import java .sql .SQLException ;
1416import java .util .HashMap ;
@@ -196,4 +198,22 @@ public class MissionStepTest {
196198 .then ().log ().all ()
197199 .statusCode (400 );
198200 }
201+
202+ @ Autowired
203+ private ReservationController reservationController ;
204+
205+ @ Test
206+ void 십단계 () {
207+ boolean isJdbcTemplateInjected = false ;
208+
209+ for (Field field : reservationController .getClass ().getDeclaredFields ()) {
210+ if (field .getType ().equals (JdbcTemplate .class )) {
211+ isJdbcTemplateInjected = true ;
212+ break ;
213+ }
214+ }
215+
216+ assertThat (isJdbcTemplateInjected ).isFalse ();
217+ }
218+
199219}
You can’t perform that action at this time.
0 commit comments