Skip to content

Commit

Permalink
#37 [Test] Bean 등록 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
JSoi committed Jul 22, 2022
1 parent 460a736 commit 032c735
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/java/com/mpnp/baechelin/BeanTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.mpnp.baechelin;

import com.mpnp.baechelin.api.service.LocationService;
import com.mpnp.baechelin.api.service.LocationServiceWC;
import com.mpnp.baechelin.config.AppConfig;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class BeanTest {
AnnotationConfigApplicationContext ac = new
AnnotationConfigApplicationContext(AppConfig.class);
@Test
@DisplayName("빈 확인")
public void findBeanByName() {
LocationService locationService = ac.getBean("locationService",
LocationService.class);
Assertions.assertThat(locationService).isInstanceOf(LocationServiceWC.class);
}
}

0 comments on commit 032c735

Please sign in to comment.