From cc20f7d76d5b90b168cac09c8bddb3e229596a10 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Tue, 5 Nov 2024 13:26:36 -0500 Subject: [PATCH] Add a simple toString for TimedTransitionProperty (#2604) this means that we can actually see the transitions when running GetAllocationTokenCommand, for instance --- .../model/common/TimedTransitionProperty.java | 5 +++ .../tools/GetAllocationTokenCommandTest.java | 45 ++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/google/registry/model/common/TimedTransitionProperty.java b/core/src/main/java/google/registry/model/common/TimedTransitionProperty.java index 418490fee..3d0d374ca 100644 --- a/core/src/main/java/google/registry/model/common/TimedTransitionProperty.java +++ b/core/src/main/java/google/registry/model/common/TimedTransitionProperty.java @@ -185,4 +185,9 @@ public class TimedTransitionProperty implements UnsafeSe public int hashCode() { return this.backingMap.hashCode(); } + + @Override + public String toString() { + return this.backingMap.toString(); + } } diff --git a/core/src/test/java/google/registry/tools/GetAllocationTokenCommandTest.java b/core/src/test/java/google/registry/tools/GetAllocationTokenCommandTest.java index 03aa668a1..014167413 100644 --- a/core/src/test/java/google/registry/tools/GetAllocationTokenCommandTest.java +++ b/core/src/test/java/google/registry/tools/GetAllocationTokenCommandTest.java @@ -25,8 +25,12 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import com.beust.jcommander.ParameterException; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedMap; import google.registry.model.domain.Domain; +import google.registry.model.domain.fee.FeeQueryCommandExtensionItem; import google.registry.model.domain.token.AllocationToken; +import google.registry.util.DateTimeUtils; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; @@ -41,10 +45,49 @@ class GetAllocationTokenCommandTest extends CommandTestCase