Skip to content

Commit

Permalink
Fix unit test wrt new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tatu-at-datastax committed Nov 26, 2024
1 parent 24cabc2 commit fa05473
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,17 @@ public void handleBigEngineeringNotation() throws Exception {
@Nested
class ValidationDocNameViolations {
@ParameterizedTest
@ValueSource(strings = {"name", "a123", "snake_case", "camelCase", "ab-cd-ef"})
@ValueSource(
strings = {
"name",
"a123",
"snake_case",
"camelCase",
"ab-cd-ef",
"snake_case",
"colons:are:good:too",
"and/or"
})
public void allowRegularPropertyNames(String validName) {
final ObjectNode doc = objectMapper.createObjectNode();
doc.put("_id", 123);
Expand All @@ -430,7 +440,7 @@ public void catchEmptyPropertyName() {
}

@ParameterizedTest
@ValueSource(strings = {"$function", "dot.ted", "index[1]", "a/b", "a\\b"})
@ValueSource(strings = {"$function", "dot.ted", "index[1]", "a\\b", "r&b"})
public void catchInvalidPropertyName(String invalidName) {
final ObjectNode doc = objectMapper.createObjectNode();
doc.put("_id", 123);
Expand Down

0 comments on commit fa05473

Please sign in to comment.