27
27
import org .springframework .data .mapping .model .Property ;
28
28
import org .springframework .data .mapping .model .PropertyNameFieldNamingStrategy ;
29
29
import org .springframework .data .mapping .model .SimpleTypeHolder ;
30
- import org .springframework .data .util .ClassTypeInformation ;
30
+ import org .springframework .data .util .TypeInformation ;
31
31
import org .springframework .util .ReflectionUtils ;
32
32
33
33
/**
@@ -48,7 +48,7 @@ public class BasicCouchbasePersistentPropertyTests {
48
48
*/
49
49
@ BeforeEach
50
50
void beforeEach () {
51
- entity = new BasicCouchbasePersistentEntity <>(ClassTypeInformation . from (Beer .class ));
51
+ entity = new BasicCouchbasePersistentEntity <>(TypeInformation . of (Beer .class ));
52
52
}
53
53
54
54
/**
@@ -72,7 +72,7 @@ void usesAnnotatedFieldName() {
72
72
@ Test
73
73
void testSdkIdAnnotationEvaluatedAfterSpringIdAnnotationIsIgnored () {
74
74
BasicCouchbasePersistentEntity <Beer > test = new BasicCouchbasePersistentEntity <>(
75
- ClassTypeInformation . from (Beer .class ));
75
+ TypeInformation . of (Beer .class ));
76
76
Field springIdField = ReflectionUtils .findField (Beer .class , "springId" );
77
77
CouchbasePersistentProperty springIdProperty = getPropertyFor (springIdField );
78
78
@@ -91,7 +91,7 @@ class TestIdField {
91
91
@ Id private String springId ;
92
92
}
93
93
BasicCouchbasePersistentEntity <TestIdField > test = new BasicCouchbasePersistentEntity <>(
94
- ClassTypeInformation . from (TestIdField .class ));
94
+ TypeInformation . of (TestIdField .class ));
95
95
Field springIdField = ReflectionUtils .findField (TestIdField .class , "springId" );
96
96
CouchbasePersistentProperty springIdProperty = getPropertyFor (springIdField );
97
97
test .addPersistentProperty (springIdProperty );
@@ -108,7 +108,7 @@ class TestIdField {
108
108
Field idField = ReflectionUtils .findField (TestIdField .class , "id" );
109
109
CouchbasePersistentProperty idProperty = getPropertyFor (idField );
110
110
BasicCouchbasePersistentEntity <TestIdField > test = new BasicCouchbasePersistentEntity <>(
111
- ClassTypeInformation . from (TestIdField .class ));
111
+ TypeInformation . of (TestIdField .class ));
112
112
test .addPersistentProperty (idProperty );
113
113
assertThat (test .getIdProperty ()).isEqualTo (idProperty );
114
114
}
@@ -122,7 +122,7 @@ class TestIdField {
122
122
private String id ;
123
123
}
124
124
BasicCouchbasePersistentEntity <TestIdField > test = new BasicCouchbasePersistentEntity <>(
125
- ClassTypeInformation . from (TestIdField .class ));
125
+ TypeInformation . of (TestIdField .class ));
126
126
Field springIdField = ReflectionUtils .findField (TestIdField .class , "springId" );
127
127
Field idField = ReflectionUtils .findField (TestIdField .class , "id" );
128
128
CouchbasePersistentProperty idProperty = getPropertyFor (idField );
@@ -148,7 +148,7 @@ class TestIdField {
148
148
CouchbasePersistentProperty idProperty = getPropertyFor (idField );
149
149
CouchbasePersistentProperty springIdProperty = getPropertyFor (springIdField );
150
150
BasicCouchbasePersistentEntity <TestIdField > test = new BasicCouchbasePersistentEntity <>(
151
- ClassTypeInformation . from (TestIdField .class ));
151
+ TypeInformation . of (TestIdField .class ));
152
152
test .addPersistentProperty (springIdProperty );
153
153
assertThatExceptionOfType (MappingException .class ).isThrownBy (() -> {
154
154
test .addPersistentProperty (idProperty );
@@ -168,7 +168,7 @@ class TestIdField {
168
168
CouchbasePersistentProperty idProperty = getPropertyFor (idField );
169
169
CouchbasePersistentProperty springIdProperty = getPropertyFor (springIdField );
170
170
BasicCouchbasePersistentEntity <TestIdField > test = new BasicCouchbasePersistentEntity <>(
171
- ClassTypeInformation . from (TestIdField .class ));
171
+ TypeInformation . of (TestIdField .class ));
172
172
test .addPersistentProperty (springIdProperty );
173
173
assertThatExceptionOfType (MappingException .class ).isThrownBy (() -> {
174
174
test .addPersistentProperty (idProperty );
@@ -183,7 +183,7 @@ class TestIdField {
183
183
*/
184
184
private CouchbasePersistentProperty getPropertyFor (Field field ) {
185
185
186
- ClassTypeInformation <?> type = ClassTypeInformation . from (field .getDeclaringClass ());
186
+ TypeInformation <?> type = TypeInformation . of (field .getDeclaringClass ());
187
187
188
188
return new BasicCouchbasePersistentProperty (Property .of (type , field ), entity , SimpleTypeHolder .DEFAULT ,
189
189
PropertyNameFieldNamingStrategy .INSTANCE );
0 commit comments