@Test void createsArrayDescriptionForArrayContainingItems() { ObjectDescription.Builder builder = new ObjectDescription.Builder(); Foo foo1 = new Foo(); Foo foo2 = new Foo(); FooArray array = new FooArray(List.of(foo1, foo2)); ObjectDescription.ArrayDescriptionBuilder arrayBuilder = builder.setArray(() -> "cache-key-1", array, Foo.class); arrayBuilder.addItem(() -> "cache-key-2", foo1); arrayBuilder.addItem(() -> "cache-key-3", foo2); assertThat(arrayBuilder.build().describe()).contains( "\"items\":[" + "{\"--id\":\"cache-key-2\",\"--type\":\"net.davidtanzer.metalshell.jsapi.ObjectDescriptionTest$Foo\"}," + "{\"--id\":\"cache-key-3\",\"--type\":\"net.davidtanzer.metalshell.jsapi.ObjectDescriptionTest$Foo\"}]" ); }
String describe() { return ""; }
ObjectDescription { String describe() { return ""; } }
ObjectDescription { String describe() { return ""; } private  ObjectDescription(); }
ObjectDescription { String describe() { return ""; } private  ObjectDescription();  }
ObjectDescription { String describe() { return ""; } private  ObjectDescription();   }