ListAssert.describedAs
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.fest.assertions.ListAssert.describedAs(Showing top 10 results out of 315)

origin: hibernate/hibernate-search

@Test
public void testQueryOnClassBridgeField() {
  Session s = openSession();
  FullTextSession session = Search.getFullTextSession( s );
  Transaction tx = s.beginTransaction();
  QueryDescriptor query = ElasticsearchQueries.fromQueryString( "fullName:\"Klaus Hergesheimer\"" );
  List<?> result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Class-bridge provided string field" ).containsOnly( 1L );
  query = ElasticsearchQueries.fromQueryString( "age:34" );
  result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Class-bridge provided numeric field" ).containsOnly( 1L );
  tx.commit();
  s.close();
}
origin: hibernate/hibernate-search

@Test
public void testCombinedQueryOnIndexWithSortFieldAndIndexToBeUninverted() throws Exception {
  Transaction tx = fullTextSession.beginTransaction();
  Query query = queryParser.parse( "name:Bill" );
  FullTextQuery hibQuery = fullTextSession.createFullTextQuery( query, Plumber.class, BrickLayer.class );
  Sort sort = new Sort( new SortField( "sortName", SortField.Type.STRING ) ); //ASC
  hibQuery.setSort( sort );
  @SuppressWarnings("unchecked")
  List<Book> result = hibQuery.list();
  assertNotNull( result );
  assertThat( result ).onProperty( "name" )
    .describedAs( "Expecting results from index with sort field and uninverted index in the correct sort order" )
    .containsExactly( "Bill the brick layer", "Bill the plumber" );
  tx.commit();
}
origin: hibernate/hibernate-search

@Test
public void testQueryOnNullToken() {
  Session s = openSession();
  FullTextSession session = Search.getFullTextSession( s );
  Transaction tx = s.beginTransaction();
  QueryDescriptor query = ElasticsearchQueries.fromQueryString( "firstName:&lt;NULL&gt;" );
  List<?> result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Querying null-encoded String" ).containsOnly( 2L );
  query = ElasticsearchQueries.fromQueryString( "dateOfBirth:1970-01-01" );
  result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Querying null-encoded Date" ).containsOnly( 2L );
  query = ElasticsearchQueries.fromQueryString( "active:false" );
  result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Querying null-encoded Boolean" ).containsOnly( 2L );
  query = ElasticsearchQueries.fromQueryString( "driveWidth:\\-1" );
  result = session.createFullTextQuery( query, GolfPlayer.class ).list();
  assertThat( result ).onProperty( "id" ).describedAs( "Querying null-encoded Integer" ).containsOnly( 2L );
  tx.commit();
  s.close();
}
origin: hibernate/hibernate-search

.describedAs( "Sortable field via programmatic config" )
.containsExactly( (short) 3354, (short) 3454, (short) 3554 );
.describedAs( "Sortable field via programmatic config" )
.containsExactly( 1, 2, 3 );
origin: hibernate/hibernate-search

assertThat( result ).onProperty( "id" ).describedAs( "Geo distance query" ).containsOnly( 1, 2, 3, 4 );
origin: hibernate/hibernate-search

.describedAs( "Running delete-by-query for other tenant should not affect entities of this entity" )
.onProperty( "name" )
.containsOnly( "Metz", "Plenty" );
origin: hibernate/hibernate-search

.describedAs( "Query results are not in the order expected as per configured field boosts" )
.onProperty( "id" )
.containsExactly( 2L, 4L, 3L, 1L );
origin: hibernate/hibernate-search

    .describedAs( "Retrieved facets - values" )
    .containsExactly( "[, 50.0)", "[50.0, 1000.0)", "[1000.0, ]" );
assertThat( facets ).onProperty( "count" )
    .describedAs( "Retrieved facets - counts" )
    .containsExactly( 2, 1, 1 );
origin: hibernate/hibernate-search

    .setSort( new Sort( new DistanceSortField( 24, 32, "location" ) ) )
    .list();
assertThat( result ).onProperty( "id" ).describedAs( "Geo distance query" ).containsOnly( 1, 2, 3 );
origin: hibernate/hibernate-search

.describedAs( "Can load results originating from different id spaces, using different id types and names" )
.containsOnly(
"Southern Florida College of Golf",
org.fest.assertionsListAssertdescribedAs

Popular methods of ListAssert

  • hasSize
  • isEmpty
  • containsOnly
  • as
  • containsExactly
    Verifies that the actual List contains the given objects, in the same order. This method works just
  • onProperty
    Creates a new instance of ListAssert whose target list contains the values of the given property nam
  • isEqualTo
  • contains
    Verifies that the actual List contains the given object at the given index.
  • isNotEmpty
  • isNotNull
  • isNull
  • <init>
    Creates a new ListAssert.
  • isNull,
  • <init>,
  • actualGroupSize,
  • containsSequence,
  • excludes,
  • fail,
  • failElementNotFound,
  • failIfCustomMessageIsSet,
  • failIfNotEndingWithSequence

Popular classes and methods

  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Path (java.nio.file)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)