@@ -265,19 +265,19 @@ like the `@Autowired` `TestRestTemplate`, are standard Spring Boot features.
265
265
266
266
And to help with correct dependencies here is the excerpt from POM
267
267
268
- [source, xml]
268
+ [source, xml, subs=attributes+ ]
269
269
----
270
270
<parent>
271
271
<groupId>org.springframework.boot</groupId>
272
272
<artifactId>spring-boot-starter-parent</artifactId>
273
- <version>2.2.2.RELEASE </version>
273
+ <version>{spring-boot-version} </version>
274
274
<relativePath/> <!-- lookup parent from repository -->
275
275
</parent>
276
276
. . . .
277
277
<dependency>
278
278
<groupId>org.springframework.cloud</groupId>
279
279
<artifactId>spring-cloud-function-web</artifactId>
280
- <version>3.0.1.BUILD-SNAPSHOT </version>
280
+ <version>{project-version} </version>
281
281
</dependency>
282
282
<dependency>
283
283
<groupId>org.springframework.boot</groupId>
@@ -292,28 +292,21 @@ And to help with correct dependencies here is the excerpt from POM
292
292
<groupId>org.springframework.boot</groupId>
293
293
<artifactId>spring-boot-starter-test</artifactId>
294
294
<scope>test</scope>
295
- <exclusions>
296
- <exclusion>
297
- <groupId>org.junit.vintage</groupId>
298
- <artifactId>junit-vintage-engine</artifactId>
299
- </exclusion>
300
- </exclusions>
301
295
</dependency>
302
296
----
303
297
304
298
Or you could write a test for a non-HTTP app using just the `FunctionCatalog`. For example:
305
299
306
300
[source, java]
307
301
----
308
- @RunWith(SpringRunner.class)
309
302
@FunctionalSpringBootTest
310
303
public class FunctionalTests {
311
304
312
305
@Autowired
313
306
private FunctionCatalog catalog;
314
307
315
308
@Test
316
- public void words() throws Exception {
309
+ public void words() {
317
310
Function<String, String> function = catalog.lookup(Function.class,
318
311
"uppercase");
319
312
assertThat(function.apply("hello")).isEqualTo("HELLO");
0 commit comments