vertx/src/test/java/eu/internetofus/common/vertx/QueryBuilderTest.java
/**
   * Should create query with regex.
   *
   * @param value that contains the regex.
   *
   * @see QueryBuilder#withEqOrRegex(String, String)
   */
Should create query with regex.
@param value that contains the regex.


Should create query with regex . @param value that contains the regex .
@ParameterizedTest(name = "Should create Regex query with value {0}")
  @ValueSource(strings = { "/8/", "/value/", "//" })
  public void shouldCreateQueryWithRegexValue(final String value) {
    final var builder = new QueryBuilder();
    assertThat(builder.withEqOrRegex("fieldName", value)).isSameAs(builder);
    assertThat(builder.build()).isEqualTo(new JsonObject().put("fieldName",
        new JsonObject().put("$regex", builder.extractPattern(value)).put("$options", "i")));
  }
@ ParameterizedTest ( name = "Should create Regex query with value {0}" ) @ ValueSource ( strings = { "/8/" , "/value/" , "//" } ) public void shouldCreateQueryWithRegexValue ( final String value ) { final var builder = new QueryBuilder ( ) ; assertThat ( builder . withEqOrRegex ( "fieldName" , value ) ) . isSameAs ( builder ) ; assertThat ( builder . build ( ) ) . isEqualTo ( new JsonObject ( ) . put ( "fieldName" , new JsonObject ( ) . put ( "$regex" , builder . extractPattern ( value ) ) . put ( "$options" , "i" ) ) ) ; }
Should create query with regex.
Should create query with regex .