Commit Graph

232 Commits

Author SHA1 Message Date
Phillip Webb
a8f366a554 Fix copyright header for edited files 2018-03-16 15:07:23 -07:00
Phillip Webb
798522d890 Format with Eclipse Oxygen SR2 2018-02-08 15:46:49 -08:00
Andy Wilkinson
debe15b284 Polish 2018-02-05 19:16:45 +00:00
Andy Wilkinson
aac88502c8 Reinject mocks when context is dirtied before each method
Closes gh-11903
2018-02-05 10:53:34 +00:00
Spring Buildmaster
6414b42335 Next Development Version 2018-01-30 23:29:33 +00:00
Phillip Webb
8e783cdae9 Polish 2018-01-18 21:42:11 -08:00
Johnny Lim
97a51ddcaa Use the platform-specific line separator
See gh-11674
2018-01-18 17:00:18 +01:00
Phillip Webb
2c429ba77d Restore static final formatting
Restore static final constants to upper case formatting.

See gh-10457
2017-12-13 12:21:57 -08:00
Phillip Webb
6a55623910 Polish 2017-12-13 12:21:57 -08:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Andy Wilkinson
663cae1255 Note behaviour of @MockBean and @SpyBean with non-bean dependencies
Closes gh-10381
2017-09-29 15:51:56 +01:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Andy Wilkinson
7a4c18eaba Polish "Deprecate JsonContent.assertThat()"
Closes gh-9678
2017-07-27 10:50:09 +01:00
Priyanshi
fa57491030 Deprecate JsonContent.assertThat()
See gh-9678
2017-07-27 10:49:55 +01:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Andy Wilkinson
ece66e1d4a Polish javadoc in JsonContentAssert
See gh-9675
2017-07-21 15:30:09 +01:00
Andy Wilkinson
f6727e786a Polish "Fix JsonContentAssert type safety warnings"
- Format code
- Update an existing test to use the contains method that would
  previously have triggered a type safety warning

Closes gh-9675
2017-07-21 15:14:53 +01:00
Mihhail Lapushkin
ae91c8460f Fix JsonContentAssert type safety warnings
Previously, JsonContentAssert returns AbstractMapAssert from
extractingJsonPathMapValue. This could lead to type safety warnings
when calling one of the assert's methods with a generic varargs
parameter such as
contains(Entry<? extends Object, ? extends Object>...).

This commit replaces the use of both AbstractMapAssert and
AbstractListAssert with MapAssert and ListAssert respectively. These
classes use final methods and @SafeVargs args to prevent the
above-described problem from occurring.

See gh-9675
2017-07-21 15:10:57 +01:00
Spring Buildmaster
05d4d0281c Next Development Version 2017-06-08 12:47:16 +00:00
Andy Wilkinson
84721666c5 Stop DuplicateJsonObjectContextCustomizer breaking context caching
See gh-9248
2017-06-06 22:23:43 +01:00
Andy Wilkinson
21a5ab7875 Log a warning during tests when multiple JSONOjects on the class path
Closes gh-9248
2017-06-06 21:35:33 +01:00
Stephane Nicoll
b5709fd618 Polish
See gh-9330
2017-05-28 17:44:58 +02:00
Stephane Nicoll
a22b3d9515 Merge branch '1.4.x' into 1.5.x 2017-05-12 17:27:28 +02:00
Stevo Slavić
6e1d99aa10 Fix typo in javadoc
Closes gh-9212
2017-05-12 17:26:26 +02:00
Phillip Webb
931ce15d7f Update copyright header dates 2017-05-09 21:43:52 -07:00
Spring Buildmaster
9768b0a8c2 Next Development Version 2017-04-21 08:32:01 +00:00
Spring Buildmaster
d719d2cbbc Next Development Version 2017-04-20 12:46:19 +00:00
Phillip Webb
5abc050a96 Support detection and with test initializers
Relax `SpringBootTestContextBootstrapper` rules so that a test can
specify an `ApplicationContextInitializer` and still have
`@SpringBootConfiguration` detected.

Prior to this commit detection would not occur because it's possible
that an initializer _could_ register configuration. This scenario is
actually quite unlikely to occur, certainly less likely than wanting to
use an initializer in combination with auto-detection.

Fixes gh-8483
2017-04-19 22:18:12 -07:00
Phillip Webb
393c17b68b Support @SpringBootTest with @ContextHierarchy
Update SpringBootTestContextBootstrapper to detect `@ContextHierarchy`
annotations so that only the last child creates a
`WebApplicationContext`.

Prior to this commit a context hierarchy would start two embedded web
servers which is inconsistent with the `SpringApplicationBuilder`
behavior.

Fixes gh-8311
2017-04-18 14:56:12 -07:00
Phillip Webb
8eb79b3c0f Polish 2017-04-18 11:13:12 -07:00
Phillip Webb
f46d799f31 Polish 2017-04-17 22:08:51 -07:00
Madhura Bhave
9e2d54feae Support json view with JacksonTester
Closes gh-8672
2017-04-17 11:14:26 -07:00
Stephane Nicoll
c8ac94b75d Polish contribution
Closes gh-8490
2017-03-10 09:51:35 +01:00
Roland Weisleder
a6f0da8cc6 Introduce reset method to OutputCapture
Closes gh-8390
2017-03-10 09:48:36 +01:00
Spring Buildmaster
d23fa24340 Next Development Version 2017-03-03 16:18:26 +00:00
Spring Buildmaster
2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Andy Wilkinson
545b29552d Merge branch '1.4.x' into 1.5.x 2017-02-28 15:58:08 +00:00
Andy Wilkinson
98cf35d48e Polish "Ignore spock.lang annotations when creating test context cache key"
See gh-8252
2017-02-28 15:55:55 +00:00
erlholmq
8f18df8a9c Ignore spock.lang annotations when creating test context cache key
See gh-7524
Closes gh-8252
2017-02-28 15:49:35 +00:00
Phillip Webb
ca1540cefe Update header copyright for changed files 2017-02-27 20:41:18 -08:00
Phillip Webb
5867cd6175 Polish 2017-02-27 20:41:18 -08:00
Andy Wilkinson
8318177b0d Merge branch '1.4.x' into 1.5.x 2017-02-21 20:20:26 +00:00
Andy Wilkinson
70e802fba5 Use name from @SpyBean to disambiguate multiple candidates
Previously, @SpyBean's name attribute was not used when determining
the name of the bean to spy upon. When there were multiple candidates,
none of which were primary, this would lead to a failure to find the
bean to spy upon. This behaviour is also inconsistent with @MockBean
which does use the name attribute to identify the bean to mock.

This commit updates MockitoPostProcessor to use the name attribute,
when set, to identify the bean that should be spied upon. For
consistency with @MockBean it is always used when set. When not set
the previous logic will continue to be used.

Closes gh-8315
2017-02-21 20:19:50 +00:00
Johnny Lim
0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
2017-02-06 10:35:13 +01:00
Andy Wilkinson
b9b0cdb342 Merge branch '1.4.x' into 1.5.x 2017-02-02 13:48:19 +00:00
Andy Wilkinson
2f50d515a1 Apply root to URIs directly rather than relying on expansion
Previously, TestRestTemplate applied the root URI to URIs by
converting them to a String and then passing the String to the
RestTemplate delegate. Being a String, meant that the URI passed
through RestTemplate's standard URI template expansion processing
using the configured UriTemplateHandler. While this caused the root
URI to be applied, it also had the unwanted side-effect of
encoding the URI for a second time.

This commit updates TestRestTemplate so that, when configured with a
RootUriTemplateHandler, it applies the root URI directly and then
passes a modified URI to the RestTemplate delegate. Being a URI means
that no template expansion is performed and the possible double
encoding is avoided.

Closes gh-8163
2017-02-02 13:28:52 +00:00
Spring Buildmaster
5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00