use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method rejectsNullTypeForIsSimpleTypeCall.
// DATACMNS-31
@Test(expected = IllegalArgumentException.class)
public void rejectsNullTypeForIsSimpleTypeCall() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
holder.isSimpleType(null);
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersObjectToBeSimpleType.
@Test
public void considersObjectToBeSimpleType() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(Object.class)).isTrue();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersJavaLangTypesSimple.
// DATACMNS-1006
@Test
public void considersJavaLangTypesSimple() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(Type.class)).isTrue();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method considersSimpleEnumAsSimple.
@Test
public void considersSimpleEnumAsSimple() {
SimpleTypeHolder holder = SimpleTypeHolder.DEFAULT;
assertThat(holder.isSimpleType(SimpleEnum.FOO.getClass())).isTrue();
}
use of org.springframework.data.mapping.model.SimpleTypeHolder in project spring-data-commons by spring-projects.
the class SimpleTypeHolderUnitTests method createsHolderFromAnotherOneCorrectly.
@Test
public void createsHolderFromAnotherOneCorrectly() {
SimpleTypeHolder holder = new SimpleTypeHolder(Collections.singleton(SimpleTypeHolder.class), true);
SimpleTypeHolder second = new SimpleTypeHolder(Collections.singleton(SimpleTypeHolderUnitTests.class), holder);
assertThat(holder.isSimpleType(SimpleTypeHolder.class)).isTrue();
assertThat(holder.isSimpleType(SimpleTypeHolderUnitTests.class)).isFalse();
assertThat(second.isSimpleType(SimpleTypeHolder.class)).isTrue();
assertThat(second.isSimpleType(SimpleTypeHolderUnitTests.class)).isTrue();
}
Aggregations