2727import org .junit .jupiter .api .BeforeEach ;
2828import org .junit .jupiter .api .Test ;
2929import org .junit .jupiter .api .extension .ExtendWith ;
30-
3130import org .springframework .beans .factory .annotation .Autowired ;
3231import org .springframework .context .annotation .ComponentScan ;
3332import org .springframework .context .annotation .Configuration ;
5150@ ExtendWith (SpringExtension .class )
5251public class ProjectingRepositoryIntegrationTests {
5352
54- @ Autowired
55- private ImmutableObjectRepository repository ;
53+ @ Autowired private ImmutableObjectRepository repository ;
5654 private JdbcTemplate jdbc ;
5755
5856 @ Configuration
59- @ EnableR2dbcRepositories (
60- includeFilters = @ ComponentScan .Filter (value = ImmutableObjectRepository .class , type = FilterType .ASSIGNABLE_TYPE ),
61- considerNestedRepositories = true )
57+ @ EnableR2dbcRepositories (includeFilters = @ ComponentScan .Filter (value = ImmutableObjectRepository .class ,
58+ type = FilterType .ASSIGNABLE_TYPE ), considerNestedRepositories = true )
6259 static class TestConfiguration extends AbstractR2dbcConfiguration {
6360 @ Override
6461 public ConnectionFactory connectionFactory () {
@@ -74,9 +71,7 @@ void before() {
7471
7572 try {
7673 this .jdbc .execute ("DROP TABLE immutable_non_null" );
77- }
78- catch (DataAccessException e ) {
79- }
74+ } catch (DataAccessException e ) {}
8075
8176 this .jdbc .execute ("CREATE TABLE immutable_non_null (id serial PRIMARY KEY, name varchar(255), email varchar(255))" );
8277 this .
jdbc .
execute (
"INSERT INTO immutable_non_null VALUES (42, 'Walter', '[email protected] ')" );
@@ -100,8 +95,7 @@ protected ConnectionFactory createConnectionFactory() {
10095 return H2TestSupport .createConnectionFactory ();
10196 }
10297
103- @ Test
104- // GH-1687
98+ @ Test // GH-1687
10599 void shouldApplyProjectionDirectly () {
106100
107101 repository .
findProjectionByEmail (
"[email protected] " )
// @@ -111,8 +105,7 @@ void shouldApplyProjectionDirectly() {
111105 }).verifyComplete ();
112106 }
113107
114- @ Test
115- // GH-1687
108+ @ Test // GH-1687
116109 void shouldApplyEntityQueryProjectionDirectly () {
117110
118111 repository .
findAllByEmail (
"[email protected] " )
// @@ -134,8 +127,7 @@ interface ImmutableObjectRepository extends ReactiveCrudRepository<ImmutableNonN
134127 @ Table ("immutable_non_null" )
135128 static class ImmutableNonNullEntity implements Person {
136129
137- final @ Nullable
138- @ Id Integer id ;
130+ final @ Nullable @ Id Integer id ;
139131 final String name ;
140132 final String email ;
141133
0 commit comments