|
14 | 14 | import dev.zarr.zarrjava.v3.*; |
15 | 15 | import dev.zarr.zarrjava.v3.codec.CodecBuilder; |
16 | 16 | import dev.zarr.zarrjava.v3.codec.core.TransposeCodec; |
17 | | -import jdk.jshell.spi.ExecutionControl; |
18 | 17 | import org.junit.jupiter.api.Assertions; |
19 | 18 | import org.junit.jupiter.api.BeforeAll; |
20 | 19 | import org.junit.jupiter.api.Test; |
|
30 | 29 | import java.nio.file.Paths; |
31 | 30 | import java.util.Arrays; |
32 | 31 | import java.util.Comparator; |
| 32 | +import java.util.HashMap; |
33 | 33 | import java.util.Map; |
34 | 34 | import java.util.stream.Stream; |
35 | 35 |
|
@@ -150,13 +150,16 @@ public void testWriteReadWithZarrita(String codec, String codecParam) throws Exc |
150 | 150 | int[] testData = new int[16 * 16 * 16]; |
151 | 151 | Arrays.setAll(testData, p -> p); |
152 | 152 |
|
| 153 | + Map<String, Object> attributes = new HashMap<>(); |
| 154 | + attributes.put("test_key", "test_value"); |
| 155 | + |
153 | 156 | StoreHandle storeHandle = new FilesystemStore(TESTOUTPUT).resolve("write_to_zarrita", codec, codecParam); |
154 | 157 | ArrayMetadataBuilder builder = Array.metadataBuilder() |
155 | 158 | .withShape(16, 16, 16) |
156 | 159 | .withDataType(DataType.UINT32) |
157 | 160 | .withChunkShape(2, 4, 8) |
158 | 161 | .withFillValue(0) |
159 | | - .withAttributes(Map.of("test_key", "test_value")); |
| 162 | + .withAttributes(attributes); |
160 | 163 |
|
161 | 164 | switch (codec) { |
162 | 165 | case "blosc": |
@@ -425,8 +428,11 @@ public void testV3FillValue() throws ZarrException { |
425 | 428 | public void testV3Group() throws IOException, ZarrException { |
426 | 429 | FilesystemStore fsStore = new FilesystemStore(TESTOUTPUT); |
427 | 430 |
|
| 431 | + Map<String, Object> attributes = new HashMap<>(); |
| 432 | + attributes.put("hello", "world"); |
| 433 | + |
428 | 434 | Group group = Group.create(fsStore.resolve("testgroup")); |
429 | | - Group group2 = group.createGroup("test2", Map.of("hello", "world")); |
| 435 | + Group group2 = group.createGroup("test2", attributes); |
430 | 436 | Array array = group2.createArray("array", b -> |
431 | 437 | b.withShape(10, 10) |
432 | 438 | .withDataType(DataType.UINT8) |
|
0 commit comments