UseMainMethod

Enumeration of how the main method of the @SpringBootConfiguration-annotated class is used when creating and running the SpringApplication under test.

Since

3.0.0

Entries

Link copied to clipboard

Always use the main method. A failure will occur if there is no @SpringBootConfiguration-annotated class or that class does not have a main method.

Link copied to clipboard

Never use the main method, creating a test-specific SpringApplication instead.

Link copied to clipboard

Use the main method when it is available. If there is no @SpringBootConfiguration-annotated class or that class does not have a main method, a test-specific SpringApplication will be used.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.