DATACASS-507 - Adapt API changes in Property in test cases.
This commit is contained in:
@@ -110,7 +110,8 @@ public class BasicCassandraPersistentPropertyUnitTests {
|
||||
|
||||
Field field = ReflectionUtils.findField(type, fieldName);
|
||||
|
||||
return new BasicCassandraPersistentProperty(Property.of(field), getEntity(type), CassandraSimpleTypeHolder.HOLDER);
|
||||
return new BasicCassandraPersistentProperty(Property.of(ClassTypeInformation.from(type), field), getEntity(type),
|
||||
CassandraSimpleTypeHolder.HOLDER);
|
||||
}
|
||||
|
||||
private <T> BasicCassandraPersistentEntity<T> getEntity(Class<T> type) {
|
||||
|
||||
@@ -57,11 +57,12 @@ public class CassandraCompositePrimaryKeyUnitTests {
|
||||
key = context.getRequiredPersistentEntity(ClassTypeInformation.from(CompositeKey.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // DATACASS-507
|
||||
public void validateMappingInfo() {
|
||||
|
||||
Field field = ReflectionUtils.findField(TypeWithCompositeKey.class, "id");
|
||||
CassandraPersistentProperty property = new BasicCassandraPersistentProperty(Property.of(field), entity,
|
||||
CassandraPersistentProperty property = new BasicCassandraPersistentProperty(
|
||||
Property.of(ClassTypeInformation.from(TypeWithCompositeKey.class), field), entity,
|
||||
CassandraSimpleTypeHolder.HOLDER);
|
||||
assertThat(property.isIdProperty()).isTrue();
|
||||
assertThat(property.isCompositePrimaryKey()).isTrue();
|
||||
|
||||
@@ -60,10 +60,10 @@ public class CompoundPrimaryKeyUnitTests {
|
||||
entity = new BasicCassandraPersistentEntity<>(ClassTypeInformation.from(Timeline.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // DATACASS-507
|
||||
public void checkIdProperty() {
|
||||
Field id = ReflectionUtils.findField(Timeline.class, "id");
|
||||
CassandraPersistentProperty property = getPropertyFor(Property.of(id));
|
||||
CassandraPersistentProperty property = getPropertyFor(Property.of(ClassTypeInformation.from(Timeline.class), id));
|
||||
assertThat(property.isIdProperty()).isTrue();
|
||||
assertThat(property.isCompositePrimaryKey()).isTrue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user