More tests for auto detect of start class
This commit is contained in:
@@ -59,6 +59,21 @@ public abstract class FunctionCreatorConfigurationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
@TestPropertySource(properties = {
|
||||
"function.location=app:classpath,file:target/test-classes,file:target/test-classes/app",
|
||||
"function.bean=myDoubler" })
|
||||
public static class SingleFunctionWithAutoMainTests
|
||||
extends FunctionCreatorConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void testDouble() {
|
||||
Function<Flux<Integer>, Flux<Integer>> function = catalog
|
||||
.lookup(Function.class, "function0");
|
||||
assertThat(function.apply(Flux.just(2)).blockFirst()).isEqualTo(4);
|
||||
}
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
@TestPropertySource(properties = { "function.location=app:classpath",
|
||||
"function.bean=org.springframework.cloud.function.test.SpringDoubler" })
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Manifest-Version: 1.0
|
||||
Implementation-Title: function-file-sample
|
||||
Implementation-Version: 1.0.0.M1
|
||||
Archiver-Version: Plexus Archiver
|
||||
Built-By: dsyer
|
||||
Implementation-Vendor-Id: com.example
|
||||
Spring-Boot-Version: 1.5.12.RELEASE
|
||||
Implementation-Vendor: Pivotal Software, Inc.
|
||||
Main-Class: org.springframework.boot.loader.JarLauncher
|
||||
Start-Class: org.springframework.cloud.function.test.FunctionApp
|
||||
Created-By: Apache Maven 3.5.0
|
||||
Build-Jdk: 1.8.0_131
|
||||
Implementation-URL: http://projects.spring.io/spring-boot/function-sam
|
||||
ple/
|
||||
Reference in New Issue
Block a user