use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersComplexEnumAsSimple.
@Test
public void considersComplexEnumAsSimple() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(ComplexEnum.FOO.getClass())).isTrue();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method alwaysConsidersEnumsSimple.
// DATACMNS-1278
@Test
public void alwaysConsidersEnumsSimple() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(SomeInterface.class)).isFalse();
assertThat(holder.isSimpleType(InterfacedEnum.class)).isTrue();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersExtendedTypeAsSimpleSeenBaseClassBefore.
// DATACMNS-1101
@Test
public void considersExtendedTypeAsSimpleSeenBaseClassBefore() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(Person.class)).isFalse();
assertThat(holder.isSimpleType(ExtendedPerson.class)).isFalse();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersExtendedTypeAsSimple.
// DATACMNS-1101
@Test
public void considersExtendedTypeAsSimple() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(ExtendedPerson.class)).isFalse();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method addsDefaultTypes.
@Test
public void addsDefaultTypes() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(String.class)).isTrue();
}
Aggregations