Skip to content

Commit 6c47593

Browse files
committed
Fix ExpressionUtilsTests according SF changes
Related to: spring-projects/spring-framework#27446
1 parent 1341a45 commit 6c47593

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Diff for: spring-integration-core/src/test/java/org/springframework/integration/expression/ExpressionUtilsTests.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2019 the original author or authors.
2+
* Copyright 2013-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@
1818

1919
import static org.assertj.core.api.Assertions.assertThat;
2020

21-
import org.junit.Test;
21+
import java.util.function.Supplier;
22+
23+
import org.junit.jupiter.api.Test;
2224

2325
import org.springframework.beans.factory.support.RootBeanDefinition;
2426
import org.springframework.context.support.ConversionServiceFactoryBean;
@@ -33,6 +35,7 @@
3335

3436
/**
3537
* @author Gary Russell
38+
* @author Artem Bilan
3639
*
3740
* @since 3.0
3841
*/
@@ -66,7 +69,7 @@ public void testEvaluationContextDefaultTypeConverter() {
6669
assertThat(evalContext.getBeanResolver()).isNotNull();
6770
TypeConverter typeConverter = evalContext.getTypeConverter();
6871
assertThat(typeConverter).isNotNull();
69-
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService"))
72+
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService", Supplier.class).get())
7073
.isSameAs(DefaultConversionService.getSharedInstance());
7174
}
7275

@@ -80,9 +83,9 @@ public void testEvaluationContextNoFactoryBean() {
8083
assertThat(evalContext.getBeanResolver()).isNotNull();
8184
TypeConverter typeConverter = evalContext.getTypeConverter();
8285
assertThat(typeConverter).isNotNull();
83-
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService"))
86+
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService", Supplier.class).get())
8487
.isNotSameAs(DefaultConversionService.getSharedInstance());
85-
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService"))
88+
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService", Supplier.class).get())
8689
.isSameAs(context.getBean(IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME));
8790
}
8891

@@ -92,7 +95,8 @@ public void testEvaluationContextNoBeanFactory() {
9295
assertThat(evalContext.getBeanResolver()).isNull();
9396
TypeConverter typeConverter = evalContext.getTypeConverter();
9497
assertThat(typeConverter).isNotNull();
95-
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService"))
98+
assertThat(TestUtils.getPropertyValue(typeConverter, "conversionService", Supplier.class).get())
9699
.isSameAs(DefaultConversionService.getSharedInstance());
97100
}
101+
98102
}

0 commit comments

Comments
 (0)