Skip to content

Commit

Permalink
Add test coverage for null constructor args
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Apr 8, 2024
1 parent 7a2b70b commit dc46e88
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,10 @@ private static InferenceFieldMetadata createTestItem() {
String[] inputFields = generateRandomStringArray(5, 10, false, false);
return new InferenceFieldMetadata(name, inferenceId, inputFields);
}

public void testNullCtorArgsThrowException() {
assertThrows(NullPointerException.class, () -> new InferenceFieldMetadata(null, "inferenceId", new String[0]));
assertThrows(NullPointerException.class, () -> new InferenceFieldMetadata("name", null, new String[0]));
assertThrows(NullPointerException.class, () -> new InferenceFieldMetadata("name", "inferenceId", null));
}
}

0 comments on commit dc46e88

Please sign in to comment.