mirror of
https://github.com/google/nomulus.git
synced 2025-07-06 11:13:35 +02:00
Fix AllocationTokenTest (#779)
This commit is contained in:
parent
c36f0c89c8
commit
ea2a6165e5
1 changed files with 3 additions and 1 deletions
|
@ -224,11 +224,13 @@ public class AllocationTokenTest extends EntityTestCase {
|
|||
|
||||
@Test
|
||||
void testBuild_redemptionHistoryEntryOnlyInSingleUse() {
|
||||
DomainBase domain = persistActiveDomain("blahdomain.foo");
|
||||
Key<HistoryEntry> historyEntryKey = Key.create(Key.create(domain), HistoryEntry.class, 1);
|
||||
AllocationToken.Builder builder =
|
||||
new AllocationToken.Builder()
|
||||
.setToken("foobar")
|
||||
.setTokenType(TokenType.UNLIMITED_USE)
|
||||
.setRedemptionHistoryEntry(VKey.create(HistoryEntry.class, 1L));
|
||||
.setRedemptionHistoryEntry(VKey.create(HistoryEntry.class, 1L, historyEntryKey));
|
||||
IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, builder::build);
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue