vertx/src/test/java/eu/internetofus/common/vertx/QueryBuilderTest.java
/**
   * Should create regex query with a pattern.
   *
   * @see QueryBuilder#withRegex(String, String)
   */
Should create regex query with a pattern.
Should create regex query with a pattern .
@Test
  public void shouldCreateQueryWithRegexp() {
    final var builder = new QueryBuilder();
    assertThat(builder.withRegex("field", "pattern")).isSameAs(builder);
    assertThat(builder.build())
        .isEqualTo(new JsonObject().put("field", new JsonObject().put("$regex", "pattern").put("$options", "i")));
  }
@ Test public void shouldCreateQueryWithRegexp ( ) { final var builder = new QueryBuilder ( ) ; assertThat ( builder . withRegex ( "field" , "pattern" ) ) . isSameAs ( builder ) ; assertThat ( builder . build ( ) ) . isEqualTo ( new JsonObject ( ) . put ( "field" , new JsonObject ( ) . put ( "$regex" , "pattern" ) . put ( "$options" , "i" ) ) ) ; }
Should create regex query with a pattern.
Should create regex query with a pattern .