Examples of SimpleTypeHolder


Examples of org.springframework.data.mapping.model.SimpleTypeHolder

*/
public class SimpleTypeHolderUnitTests {

  @Test(expected = IllegalArgumentException.class)
  public void rejectsNullCustomTypes() {
    new SimpleTypeHolder(null, false);
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

    new SimpleTypeHolder(null, false);
  }

  @Test(expected = IllegalArgumentException.class)
  public void rejectsNullOriginal() {
    new SimpleTypeHolder(new HashSet<Class<?>>(), null);
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  /**
   * @see DATACMNS-31
   */
  @Test(expected = IllegalArgumentException.class)
  public void rejectsNullTypeForIsSimpleTypeCall() {
    SimpleTypeHolder holder = new SimpleTypeHolder();
    holder.isSimpleType(null);
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @Test
  public void addsDefaultTypes() {

    SimpleTypeHolder holder = new SimpleTypeHolder();

    assertThat(holder.isSimpleType(String.class), is(true));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @Test
  public void doesNotAddDefaultConvertersIfConfigured() {

    SimpleTypeHolder holder = new SimpleTypeHolder(new HashSet<Class<?>>(), false);

    assertThat(holder.isSimpleType(String.class), is(false));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @Test
  public void addsCustomTypesToSimpleOnes() {

    SimpleTypeHolder holder = new SimpleTypeHolder(Collections.singleton(SimpleTypeHolder.class), true);

    assertThat(holder.isSimpleType(SimpleTypeHolder.class), is(true));
    assertThat(holder.isSimpleType(SimpleTypeHolderUnitTests.class), is(false));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @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), is(true));
    assertThat(holder.isSimpleType(SimpleTypeHolderUnitTests.class), is(false));
    assertThat(second.isSimpleType(SimpleTypeHolder.class), is(true));
    assertThat(second.isSimpleType(SimpleTypeHolderUnitTests.class), is(true));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

    assertThat(second.isSimpleType(SimpleTypeHolderUnitTests.class), is(true));
  }

  @Test
  public void considersObjectToBeSimpleType() {
    SimpleTypeHolder holder = new SimpleTypeHolder();
    assertThat(holder.isSimpleType(Object.class), is(true));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @Test
  public void considersSimpleEnumAsSimple() {

    SimpleTypeHolder holder = new SimpleTypeHolder();
    assertThat(holder.isSimpleType(SimpleEnum.FOO.getClass()), is(true));
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.SimpleTypeHolder

  }

  @Test
  public void considersComplexEnumAsSimple() {

    SimpleTypeHolder holder = new SimpleTypeHolder();
    assertThat(holder.isSimpleType(ComplexEnum.FOO.getClass()), is(true));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.