Commit Graph

71 Commits

Author SHA1 Message Date
Andy Wilkinson 37f3b1d1e5 Polish 2018-02-08 10:10:34 +00:00
Andy Wilkinson b3ed46af5a Polish 2018-02-07 16:30:03 +00:00
Phillip Webb 7ea6af0e46 Make AbstractApplicationContextRunner public
Fixes gh-11929
2018-02-06 13:28:18 -08:00
Andy Wilkinson 886f782b20 Merge branch '1.5.x' 2018-02-05 11:04:48 +00:00
Phillip Webb 69234f8c08 Polish 2018-02-02 18:59:05 -08:00
Andy Wilkinson 875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
2018-02-02 09:34:19 +00:00
igor-suhorukov 717bd2c580 Remove or use unused method parameters 2018-02-02 09:34:19 +00:00
Phillip Webb 706aa7af59 Make getInitializers() a protected method
Update `SpringBootContextLoader` so that `getInitializers()` is now a
protected method for subclasses to override if necessary.

Closes gh-11457
2018-02-01 12:24:11 -08:00
Andy Wilkinson 458dde63a8 Explicitly order AbstractTestExecutionListener subclasses
By default, AbstractTestExecutionListeners have an order of lowest
precedence. This means that it is impossible to write a listener with
lower precedence that any listener that's using the default order.

This commit updates Boot's 6 AbstractTestExecutionListeners to order
them explicitly. MockitoTestExecutionListener performs injection of
Mockito mocks and spies into the test instance. It now has an order of
2050 giving it slightly lower precedence than the dependency injection
test execution listener (2000).

The remaining 5 listeners have all been ordered with lowest precedence
- 100. This leaves them near their current lowest precedence position
while creating some room for any listeners that require lower
precedence.

Closes gh-11796
2018-02-01 14:28:25 +00:00
dreis2211 a7663c88d3 Replace casted Mockito.any() calls
Closes gh-11817
2018-01-29 07:50:29 +01:00
Jon Schneider fd237f85cc Extract common micrometer test setup
Create `MetricsRun` that can be used to apply common micrometer test
configuration to a `ApplicationContextRunner`.

Closes gh-11804
2018-01-26 14:42:22 -08:00
Phillip Webb b7c52da457 Allow custom WebTestClient beans
Update `@SpringBootTest` `WebTestClient` support so that the bean
definition is only registered when the user has not defined or
auto-configured their own.

See gh-10556
2018-01-25 00:08:19 -08:00
Phillip Webb 177281a504 Allow custom TestRestTemplate beans
Update `@SpringBootTest` `TestRestTemplate` support so that the bean
definition is only registered when the user has not defined or
auto-configured their own.

See gh-10556
2018-01-25 00:08:19 -08:00
Phillip Webb ab6ad6aa4b Polish 2018-01-24 16:09:14 -08:00
andrey.onufreyko b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
2018-01-22 16:35:06 -08:00
Stephane Nicoll c926bed6f5 Polish "Fix modifiers order"
Closes gh-11681
2018-01-19 11:30:30 +01:00
igor-suhorukov e2d05607f2 Fix modifiers order
See gh-11681
2018-01-19 11:30:06 +01:00
Phillip Webb f3379668ac Polish 2018-01-18 23:21:51 -08:00
Phillip Webb 6d93573db0 Merge branch '1.5.x' 2018-01-18 22:03:51 -08:00
Stephane Nicoll efd941bbe0 Merge branch '1.5.x' 2018-01-18 17:05:22 +01:00
Andy Wilkinson 54c0cf513b Polish 2018-01-17 19:03:23 +00:00
sdeleuze d4c91d2fe0 Improve Kotlin extensions doc about type erasure
Since type erasure can be fixed only when using
ParameterizedTypeReference based Java methods, TestRestTemplate
API documentation should be updated to specify which extensions
are subject to type erasure, and which are not.

Closes gh-11604
2018-01-16 10:19:12 +01:00
Andy Wilkinson db83a80deb Correct test expectations following changes to application context ID
See gh-11023
2018-01-10 14:12:06 +00:00
Phillip Webb b078698f20 Update copyright year of changed files 2018-01-09 12:13:27 -08:00
Johnny Lim b8706c47d6 Use instance equality for Class
Closes gh-11534
2018-01-09 09:30:36 +01:00
Andy Wilkinson 268b97bf98 No-op ResetMocksTestExecutionListener when Mockito is not present
Closes gh-11508
2018-01-05 11:13:36 +00:00
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
2018-01-05 10:30:43 +01:00
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
2018-01-05 10:29:22 +01:00
Phillip Webb bee5fa7fc6 Polish 2018-01-03 13:24:04 -08:00
Madhura Bhave 8102dc78cb Remove redundant throws declarations 2017-12-29 12:10:13 -08:00
Johnny Lim 8f7ab95e0e Use BufferedReader.lines()
Closes gh-11436
2017-12-27 16:44:27 +01:00
Johnny Lim e4f0ad2165 Polish
Closes gh-11372
2017-12-23 13:11:53 +01:00
Phillip Webb 2efa21c570 Make hot methods in-line friendly
Refactor a few hot methods so that they are more likely to be in-lined
by the JIT.

Fixes gh-11409
2017-12-22 20:55:47 -08:00
dreis2211 00d12c5b2d Align 'behavior' spelling to style guide
Closes gh-11394
2017-12-22 18:15:19 +01:00
Phillip Webb 3273859fde Polish 2017-12-13 14:32:55 -08:00
Phillip Webb 5ca608330c Merge branch '1.5.x' 2017-12-13 13:07:18 -08:00
Stephane Nicoll a626f5462d Consistent use of @AliasFor
Closes gh-10836
2017-12-13 14:42:16 +01:00
Stephane Nicoll 7f2af8b209 Polish 2017-12-13 09:46:41 +01:00
Stephane Nicoll 23218add90 Polish 2017-12-12 11:57:30 +01:00
Johnny Lim 96250743b5 Add missing "abstract" keywords
Closes gh-11303
2017-12-09 15:29:15 -08:00
Johnny Lim 6d54072e04 Remove "final" keywords
Closes gh-11294
2017-12-08 11:13:07 -08:00
Stephane Nicoll 7380920ed4 Remove wrong usage of commons-lang3
Closes gh-11267
2017-12-05 17:43:56 -08:00
Johnny Lim 2c204f2154 Polish
Closes gh-11242
2017-12-02 09:03:59 +01:00
Andy Wilkinson 03fce55cdb Polish "Remove a redundant dash in TestPropertyValues.Type"
Closes gh-11156
2017-11-27 10:44:53 +00:00
Johnny Lim f21737a675 Remove a redundant dash in TestPropertyValues.Type
Prior to this change, the dash was duplicated. For example
"test--systemEnvironment". This commit removes the redundant dash
and corrects the assertion in the test that should have caught the
problem.

See gh-11156
2017-11-27 10:43:38 +00:00
Stephane Nicoll aa87c45b5d Polish "Introduce TestRestTemplate Kotlin extensions"
Closes gh-11039
2017-11-24 09:56:47 +01:00
sdeleuze cd98da5ee9 Introduce TestRestTemplate Kotlin extensions
This commit introduces Kotlin extensions similar to the RestOperations
ones in order to be able to take advantage of Kotlin reified type
parameters for example.

See gh-11039
2017-11-24 09:44:34 +01:00
Phillip Webb e147982045 Add FilteredClassLoader
Add `FilteredClassLoader` to replace `HideClassesClassLoader` and
`HidePackagesClassLoader`.

Fixes gh-10303
2017-11-18 23:20:00 -08:00
Johnny Lim cbb483735d Polish
Closes gh-10948
2017-11-16 10:36:20 +01:00
Andy Wilkinson 71632ac767 Polish "Provide access to root URI from TestRestTemplate"
See gh-10641
2017-11-12 12:11:57 +00:00