mirror of
https://github.com/google/nomulus
synced 2026-09-13 03:24:34 +00:00
Scope down TransferData to only ContactResource and DomainResource
HostResource and DomainApplication are not transferable, (or at least, not directly in the case of hosts) and have no need for the TransferData field. In a flat-flow world, we can push it down to where it's actually used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139201423
This commit is contained in:
@@ -149,14 +149,6 @@ public class HostResourceTest extends EntityTestCase {
|
||||
.isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEmptyTransferDataBecomesNull() throws Exception {
|
||||
HostResource withNull = new HostResource.Builder().setTransferData(null).build();
|
||||
HostResource withEmpty = withNull.asBuilder().setTransferData(TransferData.EMPTY).build();
|
||||
assertThat(withNull).isEqualTo(withEmpty);
|
||||
assertThat(withEmpty.hasTransferData()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testImplicitStatusValues() {
|
||||
// OK is implicit if there's no other statuses.
|
||||
@@ -205,7 +197,6 @@ public class HostResourceTest extends EntityTestCase {
|
||||
hostResource.asBuilder()
|
||||
.setLastSuperordinateChange(superordinateChangeTime)
|
||||
.setLastTransferTime(hostTransferTime)
|
||||
.setTransferData(null)
|
||||
.build());
|
||||
return hostResource.cloneProjectedAtTime(clock.nowUtc()).getLastTransferTime();
|
||||
}
|
||||
@@ -279,8 +270,6 @@ public class HostResourceTest extends EntityTestCase {
|
||||
.build())
|
||||
.build());
|
||||
HostResource afterTransfer = hostResource.cloneProjectedAtTime(clock.nowUtc().plusDays(1));
|
||||
assertThat(afterTransfer.getTransferData().getTransferStatus())
|
||||
.isEqualTo(TransferStatus.SERVER_APPROVED);
|
||||
assertThat(afterTransfer.getCurrentSponsorClientId()).isEqualTo("winner");
|
||||
assertThat(afterTransfer.getLastTransferTime()).isEqualTo(clock.nowUtc().plusDays(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user