Browse Source

Polish formatting

pull/35587/head
Sam Brannen 4 months ago
parent
commit
64721b3bc0
  1. 15
      spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/ConnectionFactoryUtilsTests.java

15
spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/ConnectionFactoryUtilsTests.java

@ -136,24 +136,27 @@ class ConnectionFactoryUtilsTests {
void messageGeneration() { void messageGeneration() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK",
"SOME-SQL", new R2dbcTransientResourceException("MESSAGE")); "SOME-SQL", new R2dbcTransientResourceException("MESSAGE"));
assertThat(exception).isExactlyInstanceOf( assertThat(exception)
TransientDataAccessResourceException.class).hasMessage("TASK; SQL [SOME-SQL]; MESSAGE"); .isExactlyInstanceOf(TransientDataAccessResourceException.class)
.hasMessage("TASK; SQL [SOME-SQL]; MESSAGE");
} }
@Test @Test
void messageGenerationNullSQL() { void messageGenerationNullSQL() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", null, Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", null,
new R2dbcTransientResourceException("MESSAGE")); new R2dbcTransientResourceException("MESSAGE"));
assertThat(exception).isExactlyInstanceOf( assertThat(exception)
TransientDataAccessResourceException.class).hasMessage("TASK; MESSAGE"); .isExactlyInstanceOf(TransientDataAccessResourceException.class)
.hasMessage("TASK; MESSAGE");
} }
@Test @Test
void messageGenerationNullMessage() { void messageGenerationNullMessage() {
Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK", Exception exception = ConnectionFactoryUtils.convertR2dbcException("TASK",
"SOME-SQL", new R2dbcTransientResourceException()); "SOME-SQL", new R2dbcTransientResourceException());
assertThat(exception).isExactlyInstanceOf( assertThat(exception)
TransientDataAccessResourceException.class).hasMessage("TASK; SQL [SOME-SQL]; null"); .isExactlyInstanceOf(TransientDataAccessResourceException.class)
.hasMessage("TASK; SQL [SOME-SQL]; null");
} }

Loading…
Cancel
Save