@ -63,7 +63,7 @@ class SpringApplicationAotProcessorTests {
}
@Test
void invokeMainParse ArgumentsAndInvokesRunMethod( @TempDir Path directory ) throws Exception {
void invokeMainParse s ArgumentsAndInvokesRunMethod( @TempDir Path directory ) throws Exception {
String [ ] mainArguments = new String [ ] { SampleApplication . class . getName ( ) ,
directory . resolve ( "source" ) . toString ( ) , directory . resolve ( "resource" ) . toString ( ) ,
directory . resolve ( "class" ) . toString ( ) , "com.example" , "example" , "1" , "2" } ;
@ -72,6 +72,16 @@ class SpringApplicationAotProcessorTests {
assertThat ( SampleApplication . postRunInvoked ) . isFalse ( ) ;
}
@Test
void invokeMainParsesArgumentsAndInvokesRunMethodWithoutGroupId ( @TempDir Path directory ) throws Exception {
String [ ] mainArguments = new String [ ] { SampleApplication . class . getName ( ) ,
directory . resolve ( "source" ) . toString ( ) , directory . resolve ( "resource" ) . toString ( ) ,
directory . resolve ( "class" ) . toString ( ) , "" , "example" , "1" , "2" } ;
SpringApplicationAotProcessor . main ( mainArguments ) ;
assertThat ( SampleApplication . argsHolder ) . containsExactly ( "1" , "2" ) ;
assertThat ( SampleApplication . postRunInvoked ) . isFalse ( ) ;
}
@Test
void invokeMainWithMissingArguments ( ) {
assertThatIllegalArgumentException ( )