model/src/test/java/eu/internetofus/common/model/ValidateContextTest.java
/**
   * Check that a string list value is valid.
   *
   * @see ValidateContext#validateNullableStringListField(String, java.util.List,
   *      Promise)
   */
Check that a string list value is valid.
Check that a string list value is valid .
@Test
  public void shouldValidateNullableStringListField() {
    final Promise<Void> promise = Promise.promise();
    final var value = Arrays.asList("key1   ", null, "   key2", "", "key3", "        ");
    final var expected = Arrays.asList("key1", "key2", "key3");
    assertThat(this.context.validateNullableStringListField("list", value, promise)).isEqualTo(expected);
    assertThat(promise.tryComplete()).isTrue();
  }
@ Test public void shouldValidateNullableStringListField ( ) { final Promise < Void > promise = Promise . promise ( ) ; final var value = Arrays . asList ( "key1   " , null , "   key2" , "" , "key3" , "        " ) ; final var expected = Arrays . asList ( "key1" , "key2" , "key3" ) ; assertThat ( this . context . validateNullableStringListField ( "list" , value , promise ) ) . isEqualTo ( expected ) ; assertThat ( promise . tryComplete ( ) ) . isTrue ( ) ; }
Check that a string list value is valid.
Check that a string list value is valid .