rename test cases to follow BDD style
This commit is contained in:
parent
823bc9d4b0
commit
4015900366
@ -19,7 +19,7 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
public class ComponentScanAnnotationFilterAppIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testBean() {
|
||||
public void whenAnnotationFilterIsUsed_thenComponentScanShouldRegisterBeanAnnotatedWithAnimalAnootation() {
|
||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanAnnotationFilterApp.class);
|
||||
List<String> beans = Arrays.stream(applicationContext.getBeanDefinitionNames())
|
||||
.filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanAnnotationFilterApp"))
|
||||
|
@ -19,7 +19,7 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
public class ComponentScanAspectJFilterAppIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testBean() {
|
||||
public void whenAspectJFilterIsUsed_thenComponentScanShouldRegisterBeanMatchingAspectJCreteria() {
|
||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanAspectJFilterApp.class);
|
||||
List<String> beans = Arrays.stream(applicationContext.getBeanDefinitionNames())
|
||||
.filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanCustomFilterApp"))
|
||||
|
@ -19,7 +19,7 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
public class ComponentScanAssignableTypeFilterAppIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testBean() {
|
||||
public void whenAssignableTypeFilterIsUsed_thenComponentScanShouldRegisterBeanOfAssignableTypeAndItsSubClass() {
|
||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanAssignableTypeFilterApp.class);
|
||||
List<String> beans = Arrays.stream(applicationContext.getBeanDefinitionNames())
|
||||
.filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanAssignableTypeFilterApp"))
|
||||
|
@ -19,7 +19,7 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
public class ComponentScanCustomFilterAppIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testBean() {
|
||||
public void whenCustomFilterIsUsed_thenComponentScanShouldRegisterBeanMatchingCustomFilter() {
|
||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanCustomFilterApp.class);
|
||||
List<String> beans = Arrays.stream(applicationContext.getBeanDefinitionNames())
|
||||
.filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanCustomFilterApp"))
|
||||
|
@ -19,7 +19,7 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
public class ComponentScanRegexFilterAppIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testBean() {
|
||||
public void whenRegexFilterIsUsed_thenComponentScanShouldRegisterBeanMatchingRegex() {
|
||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanRegexFilterApp.class);
|
||||
List<String> beans = Arrays.stream(applicationContext.getBeanDefinitionNames())
|
||||
.filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanRegexFilterApp"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user