Package org.hibernate.search.testsupport.setup

Examples of org.hibernate.search.testsupport.setup.SearchConfigurationForTest


*/
public class TransactionsExpectedTest {

  @Test
  public void testDefaultImplementation() {
    SearchConfigurationForTest cfg = new SearchConfigurationForTest();
    verifyTransactionsExpectedOption( true, cfg );
  }
View Full Code Here


    verifyTransactionsExpectedOption( true, cfg );
  }

  @Test
  public void testTransactionsNotExpected() {
    SearchConfigurationForTest cfg = new SearchConfigurationForTest();
    cfg.setTransactionsExpected( false );
    verifyTransactionsExpectedOption( false, cfg );
  }
View Full Code Here

    verifyTransactionsExpectedOption( false, cfg );
  }

  @Test
  public void testTransactionsExpected() {
    SearchConfigurationForTest cfg = new SearchConfigurationForTest();
    cfg.setTransactionsExpected( true );
    verifyTransactionsExpectedOption( true, cfg );
  }
View Full Code Here

      targetMethod = "abstractClassesCannotInsertDocuments",
      helper = "org.hibernate.search.testsupport.BytemanHelper",
      action = "countInvocation()",
      name = "testAbstractClassAnnotatedWithIndexedLogsWarning")
  public void testAbstractClassAnnotatedWithIndexedLogsWarning() {
    SearchConfigurationForTest configuration = new SearchConfigurationForTest()
        .addClass( A.class )
        .addClass( AbstractA.class )
        .addClass( D.class );

    SearchFactoryImplementor searchFactory = new SearchFactoryBuilder().configuration( configuration ).buildSearchFactory();
View Full Code Here

      helper = "org.hibernate.search.testsupport.BytemanHelper",
      action = "countInvocation()",
      name = "testAbstractClassAnnotatedWithIndexedLogsWarning")
  public void testInvalidConfiguredPathThrowsException() {
    try {
      SearchConfigurationForTest configuration = new SearchConfigurationForTest()
          .addClass( B.class )
          .addClass( AbstractB.class )
          .addClass( D.class );

      new SearchFactoryBuilder().configuration( configuration ).buildSearchFactory();
View Full Code Here

      helper = "org.hibernate.search.testsupport.BytemanHelper",
      action = "countInvocation()",
      name = "testAbstractClassAnnotatedWithIndexedLogsWarning")
  public void testInvalidConfiguredPathThrowsExceptionAndIndexedAbstractClassLogsWarning() {
    try {
      SearchConfigurationForTest configuration = new SearchConfigurationForTest()
          .addClass( C.class )
          .addClass( AbstractC.class )
          .addClass( D.class );

      new SearchFactoryBuilder().configuration( configuration ).buildSearchFactory();
View Full Code Here

  private AnnotationMetadataProvider metadataProvider;

  @Before
  public void setUp() {
    SearchConfiguration searchConfiguration = new SearchConfigurationForTest();
    ConfigContext configContext = new ConfigContext(
        searchConfiguration,
        new BuildContextForTest( searchConfiguration )
    );
    metadataProvider = new AnnotationMetadataProvider( new JavaReflectionManager(), configContext );
View Full Code Here

  private AnnotationMetadataProvider metadataProvider;

  @Before
  public void setUp() {
    SearchConfiguration searchConfiguration = new SearchConfigurationForTest();
    ConfigContext configContext = new ConfigContext(
        searchConfiguration,
        new BuildContextForTest( searchConfiguration )
    );
    metadataProvider = new AnnotationMetadataProvider( new JavaReflectionManager(), configContext );
View Full Code Here

      .entity( Book.class ).indexed()
      //Entity missing both @DocumentId and @ProvidedId:
      .property( "title", ElementType.FIELD ).field()
      .property( "text", ElementType.FIELD ).field()
      ;
    SearchConfigurationForTest cfg = new SearchConfigurationForTest()
      .setProgrammaticMapping( mapping )
      .addClass( Book.class );
    exceptions.expect( SearchException.class );
    exceptions.expectMessage( "HSEARCH000177" );
    storeBooksViaProvidedId( cfg, ProvidedId.defaultFieldName, false );
View Full Code Here

      .entity( Book.class ).indexed()
      //Entity missing both @DocumentId and @ProvidedId:
      .property( "title", ElementType.FIELD ).field()
      .property( "text", ElementType.FIELD ).field()
      ;
    SearchConfigurationForTest cfg = new SearchConfigurationForTest()
      .setProgrammaticMapping( mapping )
      .setIdProvidedImplicit( true )
      .addClass( Book.class );
    storeBooksViaProvidedId( cfg, ProvidedId.defaultFieldName, false );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.testsupport.setup.SearchConfigurationForTest

Copyright © 2018 www.massapicom. 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.