rename test cases to follow BDD style

This commit is contained in:
devender.kumar 2019-10-01 07:30:43 +02:00
parent 823bc9d4b0
commit 4015900366
5 changed files with 5 additions and 5 deletions

View File

@ -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"))

View File

@ -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"))

View File

@ -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"))

View File

@ -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"))

View File

@ -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"))