nastra commented on code in PR #9008:
URL: https://github.com/apache/iceberg/pull/9008#discussion_r1629244450


##########
api/src/test/java/org/apache/iceberg/transforms/TestTimestamps.java:
##########
@@ -241,4 +243,54 @@ public void testTimestampsReturnType() {
     Type hourResultType = hour.getResultType(type);
     assertThat(hourResultType).isEqualTo(Types.IntegerType.get());
   }
+
+  @Test
+  public void apply_bad_source_type() {
+    Timestamps badSourceType =
+        new Timestamps(ChronoUnit.CENTURIES, Timestamps.ResultTypeUnit.YEARS, 
"year");
+    assertThatThrownBy(() -> badSourceType.apply(11L))
+        .isInstanceOf(UnsupportedOperationException.class)
+        .hasMessageMatching("Unsupported source type unit: Centuries");
+  }
+
+  @Test
+  public void apply_bad_result_type() {

Review Comment:
   please also update the other test method names accordingly, as the codebase 
typically doesn't use `_` in method names



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to