package io.trane.ndbc.postgres.encoding;

import java.util.Arrays;

import org.junit.Assert;

import io.trane.ndbc.value.StringArrayValue;

public class StringArrayEncodingTest extends EncodingTest<StringArrayValue, StringArrayEncoding> {

  public StringArrayEncodingTest() {
    super(new StringArrayEncoding(new StringEncoding(UTF8), UTF8), Oid.VARCHAR_ARRAY, StringArrayValue.class, r -> {
      final String[] strings = new String[r.nextInt(8)];
      Arrays.setAll(strings, p -> randomString(r));
      return new StringArrayValue(strings);
    }, (a, b) -> Assert.assertArrayEquals(a.getStringArray(), b.getStringArray()));
  }
}
@@ -65,34 +65,8 @@
 s;%0A%0A
-import org.junit.Assert;%0A%0A
 impo
@@ -530,16 +530,27 @@
 a, b) -%3E
+ %7B%0A      //
  Assert.
@@ -606,16 +606,34 @@
 Array())
+; failing :(%0A    %7D
 );%0A  %7D%0A%7D

Test failing :/