Package org.hibernate.search.test.util

Examples of org.hibernate.search.test.util.FullTextSessionBuilder.build()


    cfg.addAnnotatedClass( A.class );
    cfg.addAnnotatedClass( B.class );
    cfg.addAnnotatedClass( C.class );
    cfg.addAnnotatedClass( InvalidNonLeafUseCase.class );
    try {
      cfg.build();
      fail( "Exception should have been thrown for D having invalid path: b.c" );
    }
    catch (SearchException se) {
      assertTrue( "Expected search exception to contain information about invalid path b.c",
          se.getMessage().contains( "b.c" ) );
View Full Code Here


    cfg.addAnnotatedClass( B.class );
    cfg.addAnnotatedClass( C.class );
    cfg.addAnnotatedClass( InvalidEmbeddedWithoutPathsCase.class );
    cfg.addAnnotatedClass( InvalidEmbeddedPathCase.class );
    try {
      cfg.build();
      fail( "Exception should have been thrown for InvalidEmbeddedPathsCase having invalid path: emb.e4" );
    }
    catch (SearchException se) {
      assertTrue(
          "Expected search exception to contain information about invalid path emb.e4, instead got error: "
View Full Code Here

    cfg.addAnnotatedClass( B.class );
    cfg.addAnnotatedClass( C.class );
    cfg.addAnnotatedClass( InvalidEmbeddedWithoutPathsCase.class );
    cfg.addAnnotatedClass( InvalidEmbeddedNonLeafCase.class );
    try {
      cfg.build();
      fail( "Exception should have been thrown for InvalidEmbeddedNonLeafCase having invalid path: emb.e3" );
    }
    catch (SearchException se) {
      assertTrue(
          "Expected search exception to contain information about invalid leaf path emb.e3, instead got error: "
View Full Code Here

    cfg.addAnnotatedClass( B.class );
    cfg.addAnnotatedClass( C.class );
    cfg.addAnnotatedClass( ReferencesC.class );
    cfg.addAnnotatedClass( PathNotIndexedCase.class );
    try {
      cfg.build();
      fail( "Exception should have been thrown for PathNotIndexedCase having invalid path: c.indexed" );
    }
    catch (SearchException se) {
      assertTrue(
          "Expected search exception to contain information about invalid leaf path c.indexed, instead got error: "
View Full Code Here

  public void testRenamedFieldInPath() {
    FullTextSessionBuilder cfg = new FullTextSessionBuilder();
    cfg.addAnnotatedClass( FieldRenamedContainerEntity.class );
    cfg.addAnnotatedClass( FieldRenamedEmbeddedEntity.class );
    try {
      cfg.build();
      fail( "Exception should have been thrown for FieldRenamedContainerEntity having invalid path (attribute instead of field name): embedded.field" );
    }
    catch (SearchException se) {
      assertTrue(
          "Expected search exception to contain information about invalid leaf path embedded.field, instead got error: "
View Full Code Here

      .setProperty( "hibernate.search.default.indexBase", root.getAbsolutePath() + "/slave" )
      .setProperty( "hibernate.search.default.directory_provider", FSSlaveDirectoryProviderTestingExtension.class.getName() );
    if ( enableRetryInitializePeriod ) {
      builder.setProperty( "hibernate.search.default.retry_initialize_period", "12" );
    }
    return builder.build();
  }

}
View Full Code Here

    cfg.addAnnotatedClass( A.class );
    cfg.addAnnotatedClass( B.class );
    cfg.addAnnotatedClass( C.class );
    cfg.addAnnotatedClass( ReferencesIndexedEmbeddedA.class );
    cfg.addAnnotatedClass( DepthMatchesPathDepthCase.class );
    cfg.build();
  }

  /**
   * Ensures that path still marked as encountered if depth is the cause of the path being
   * traversed, and depth exceeds path depth
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.