Tabnine Logo
AssertionFailure.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.hibernate.annotations.common.AssertionFailure

Best Java code snippets using org.hibernate.annotations.common.AssertionFailure.getMessage (Showing top 2 results out of 315)

origin: hibernate/hibernate-search

@Test
public void testUpdatingInTransaction() {
  assertFindsByRoadName( "buonarroti" );
  FullTextSession fullTextSession = Search.getFullTextSession( openSession() );
  try {
    Transaction tx = fullTextSession.beginTransaction();
    resetFieldSelector();
    List list = fullTextSession.createCriteria( BusStop.class ).list();
    assertNotNull( list );
    assertEquals( 4, list.size() );
    BusStop busStop = (BusStop) list.get( 1 );
    busStop.setRoadName( "new road" );
    tx.commit();
  }
  catch (org.hibernate.annotations.common.AssertionFailure ass) {
    fail( ass.getMessage() );
  }
  finally {
    fullTextSession.close();
  }
  assertFindsByRoadName( "new" );
}
origin: hibernate/hibernate-search

@Test
public void testUpdatingOutOfTransaction() {
  assertFindsByRoadName( "buonarroti" );
  FullTextSession fullTextSession = Search.getFullTextSession( openSession() );
  try {
    List list = fullTextSession.createCriteria( BusStop.class ).list();
    assertNotNull( list );
    assertEquals( 4, list.size() );
    BusStop busStop = (BusStop) list.get( 1 );
    busStop.setRoadName( "new road" );
    fullTextSession.flush();
  }
  catch (org.hibernate.annotations.common.AssertionFailure ass) {
    fail( ass.getMessage() );
  }
  finally {
    fullTextSession.close();
  }
  assertFindsByRoadName( "new" );
}
org.hibernate.annotations.commonAssertionFailuregetMessage

Popular methods of AssertionFailure

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now