Commit Graph

273 Commits (60a4567bc4121353ec1a86cd81c642457dd6680d)

Author SHA1 Message Date
Phillip Webb 93382648ab Formatting 9 years ago
Johnny Lim 6d48ee9593 Polish
Closes gh-5714
9 years ago
Andy Wilkinson 35270e939f Update dependency management for Selenium and its HTMLUnit Driver
Closes gh-5705
9 years ago
Johnny Lim c154990024 Polish
Closes gh-5691
9 years ago
Phillip Webb 21bc166c95 Rename Import*AutoConfiguration classes
Rename Import*AutoConfiguration classes to AutoConfigure*.

Fixes gh-5692
9 years ago
Johnny Lim 90d897eb9d Polish
Closes gh-5685
9 years ago
Phillip Webb dbd577545d Remove trailing whitespace 9 years ago
Johnny Lim 10a73381e6 Remove a test doing nothing
Closes gh-5673
9 years ago
Phillip Webb b398b3319c Rename @SpringApplicationTest -> @SpringBootTest
Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
9 years ago
Andy Wilkinson e41ccfae3c Correct javadoc tag 9 years ago
Andy Wilkinson eb3180d581 Provide test auto-configuration for Spring REST Docs
This commit introduces a new annotation, @AutoConfigureRestDocs,
which can be used to enable auto-configuration of Spring REST Docs.
The auto-configuration removes the need to use Spring REST Docs' JUnit
rule and will automatically configure MockMvc. Combined with the new
auto-configuration for MockMvc it allows a test class to be free of
boilerplate configuration:

@RunWith(SpringRunner.class)
@WebMvcTest
@AutoConfigureRestDocs(outputDir = "target/generated-snippets",
        uriScheme = "https", uriHost = "api.example.com",
        uriPort = 443)
public class ExampleDocumentationTests {

    @Autowired
    private MockMvc mvc;

    @Test
    public void documentIndex() {
        // …
    }

}

For more advanced customization a RestDocsMockMvcConfigurationCustomizer
bean can be used.

If a RestDocumentationResultHandler is found in the context, it will
be passed to the ConfigurableMockMvcBuilder's alwaysDo method as part
of its customization.

Closes gh-5563
9 years ago
Andy Wilkinson f99bfccd51 Polishing 9 years ago
Andy Wilkinson b630b080ce Make it easier to customize the auto-configured MockMvcBuilder
Closes gh-5556
9 years ago
Phillip Webb 893a6c32f3 Upgrade to checkstyle 6.17
Fixes gh-5547
9 years ago
Johnny Lim a28dd9d9e6 Polish
Closes gh-5532
9 years ago
Stephane Nicoll 6be92675c2 Remove dependency version from child pom 9 years ago
Phillip Webb 81d5635571 Add @DataJpaTest annotation
Add @DataJpaTest and @AutoConfigureTestDatabase annotations to allow
testing of an application "slice" that only deals JPA.

See gh-4901
9 years ago
Phillip Webb bbc91cc03f Add @WebMvcTest annotation
Add @WebMvcTest and @AutoConfigureMockMvc annotations to allow testing
of an application "slice" that only deals with Spring MVC.

See gh-4901
9 years ago
Phillip Webb 0bd89017b6 Add @JsonTest annotation
Add @JsonTest and @AutoConfigureJsonTesters annotations to allow testing
of an application "slice" that only deals with JSON marshalling.

See gh-4901
9 years ago
Phillip Webb 56fd4e1f76 Add TypeExcludeFilters support
Provide a way for auto-configuration tests to easily filter scanned
components.

See gh-4901
9 years ago
Phillip Webb 46099c753b Add @PropertyMapping support
Add @PropertyMapping annotation which can be used to mark annotation
attributes that should contribute Environment properties.

Provides a quick way for tests to change auto-configuration behavior in
a structured way.

Fixes gh-4901
9 years ago
Phillip Webb e5f224118b Print AutoConfigureReport on test failures
Add a TestExecutionListener to print the auto-configuration report
when a test cannot load.

See gh-4901
9 years ago
Phillip Webb 6d934bb270 Add spring-boot-test-autoconfigure module
Add a new test module to deal with auto-configuration in tests.

See gh-4901
9 years ago