Ejemplo n.º 1
0
 @Test(expected = HibernateException.class)
 public void testAddingNonExistingPackageName() {
   MetadataSources sources =
       new MetadataSources(new ServiceRegistryBuilder().buildServiceRegistry());
   sources.addPackage("not.a.package");
   sources.buildMetadata();
 }
Ejemplo n.º 2
0
 @Test(expected = IllegalArgumentException.class)
 public void testAddingNullPackageName() {
   MetadataSources sources =
       new MetadataSources(new ServiceRegistryBuilder().buildServiceRegistry());
   sources.addPackage(null);
   sources.buildMetadata();
 }
Ejemplo n.º 3
0
  @Test
  public void testAddingPackageNameWithTrailingDot() {
    MetadataSources sources =
        new MetadataSources(new ServiceRegistryBuilder().buildServiceRegistry());
    sources.addPackage("org.hibernate.metamodel.source.internal.");
    MetadataImpl metadata = (MetadataImpl) sources.buildMetadata();

    assertFetchProfile(metadata);
  }