|
1 | 1 | package io.weaviate.integration; |
2 | 2 |
|
3 | 3 | import java.io.IOException; |
| 4 | +import java.util.ArrayList; |
4 | 5 |
|
5 | 6 | import org.assertj.core.api.Assertions; |
6 | 7 | import org.assertj.core.api.InstanceOfAssertFactories; |
@@ -510,4 +511,39 @@ public void test_asyncReplicationConfig() throws IOException { |
510 | 511 | .returns(13, AsyncReplicationConfig::propagationConcurrency) |
511 | 512 | .returns(14, AsyncReplicationConfig::propagationBatchSize); |
512 | 513 | } |
| 514 | + |
| 515 | + @Test |
| 516 | + public void test_properties() { |
| 517 | + Assertions.assertThatCode(() -> { |
| 518 | + var properties = new ArrayList<Property>() { |
| 519 | + { |
| 520 | + add(Property.textArray("prop_textArray")); |
| 521 | + add(Property.integer("prop_integer")); |
| 522 | + add(Property.integerArray("prop_integerArray")); |
| 523 | + add(Property.number("prop_number")); |
| 524 | + add(Property.numberArray("prop_numberArray")); |
| 525 | + add(Property.bool("prop_bool")); |
| 526 | + add(Property.boolArray("prop_boolArray")); |
| 527 | + add(Property.blob("prop_blob")); |
| 528 | + add(Property.date("prop_date")); |
| 529 | + add(Property.dateArray("prop_dateArray")); |
| 530 | + add(Property.uuid("prop_uuid")); |
| 531 | + add(Property.uuidArray("prop_uuidArray")); |
| 532 | + add(Property.object("prop_object", |
| 533 | + p -> p.nestedProperties(Property.text("foo")))); |
| 534 | + add(Property.objectArray("prop_objectArray", |
| 535 | + p -> p.nestedProperties(Property.text("foo")))); |
| 536 | + add(Property.phoneNumber("prop_phoneNumber")); |
| 537 | + add(Property.geoCoordinates("prop_geoCoordinates")); |
| 538 | + } |
| 539 | + }; |
| 540 | + |
| 541 | + requireAtLeast(Weaviate.Version.V137, () -> { |
| 542 | + properties.add(Property.blobHash("prop_blobHash")); |
| 543 | + }); |
| 544 | + |
| 545 | + client.collections.create( |
| 546 | + ns("Things"), col -> col.properties(properties)); |
| 547 | + }).doesNotThrowAnyException(); |
| 548 | + } |
513 | 549 | } |
0 commit comments