Skip to content

Commit

Permalink
Update tests and documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
gk-brown committed Jun 9, 2024
1 parent c3a6875 commit 2233cbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ public static QueryBuilder update(Class<?> type) {
* described for {@link #update(Class)}.
*
* @param propertyNames
* The names of the properties to select.
* The names of the properties to update.
*
* @return
* A new {@link QueryBuilder} instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ public void testSelectPartial() {
assertEquals(listOf("a"), getParameters(queryBuilder));
}

@Test
public void testSelectPartialInvalidProperty() {
assertThrows(IllegalArgumentException.class, () -> QueryBuilder.selectPartial(A.class, "z"));
}

@Test
public void testSelectDistinctIndex() {
var queryBuilder = QueryBuilder.selectDistinctIndex(I.class);
Expand Down Expand Up @@ -468,6 +473,11 @@ public void testUpdatePartial() {
assertEquals(listOf("e", "y", "a"), getParameters(queryBuilder));
}

@Test
public void testUpdatePartialInvalidProperty() {
assertThrows(IllegalArgumentException.class, () -> QueryBuilder.updatePartial(B.class, "z"));
}

@Test
public void testUpdateParent() {
var queryBuilder = QueryBuilder.updateParent(I.class, H.class, "h").filterByPrimaryKey("i");
Expand Down

0 comments on commit 2233cbe

Please sign in to comment.