google-nomulus/javatests/google/registry
nickfelt 30ae6effcb Add EppResource diffing to AbstractEppResourceSubject.isEqualTo()
Currently, the message you get when using e.g. assertAboutContacts().that(alice).isEqualTo(bob) is not very helpful, because we override the "actual" toString (for alice) to return just an abbreviated version, and dump the entire full ImmutableObject toString for bob:

  java.lang.AssertionError: Not true that <ContactResource with foreign key 'contact_id'> is equal to ContactResource (@2125903542): {
      authInfo=ContactAuthInfo (@2128169374): ...
    // giant blob of contact info here
  }

So you can't even figure out why they aren't equal.  Rather than reverting the "actual" object's toString representation in this case, which would just require you to visually compare two giant blobs of properties, this special-cases to let you compare using the prettyPrintEntityDeepDiff() helper we use in MutatingCommand.

With the new version, you see exactly what differs:

  java.lang.AssertionError: Not true that <ContactResource with foreign key 'contact_id'> is equal to ContactResource (@2125903542): {
      authInfo=ContactAuthInfo (@2128169374): ...
    // giant blob of contact info here
  }

  It differs as follows:
  transferData.pendingTransferExpirationTime -> [2017-03-27T16:01:39.882Z, 2020-05-08T16:01:39.882Z]
  lastTransferTime -> [2017-03-27T16:01:39.882Z, 2020-05-08T16:01:39.882Z]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151004823
2017-03-27 13:07:22 -04:00
..
backup Add @VirtualEntity checking to Ofy's deleteWithoutBackup() 2017-02-08 17:31:07 -05:00
batch Refactor main loop of MapreduceEntityCleanupAction 2017-03-13 10:38:21 -04:00
bigquery Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
builddefs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
config Remove unnecessary line to load configs 2017-02-27 11:07:40 -05:00
cron Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
dns Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
export Add Cloud KMS based secret storage 2017-02-17 12:22:12 -05:00
flows Add nameserver validation in domain update related flows 2017-03-27 12:58:19 -04:00
groups Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
keyring/kms Fix bugs in KmsConnectionImpl 2017-03-07 13:25:51 -05:00
mapreduce/inputs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
model Add validation during domain creation for locked down TLDs 2017-03-21 15:42:23 -04:00
module Fix stale doPost references in servlet test method names 2017-02-27 11:15:01 -05:00
monitoring Add monitoring/metrics/contrib package to Nomulus release 2017-03-21 14:59:31 -04:00
pricing Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rdap Remove obsolete TransferData.extendedRegistrationYears 2017-03-21 15:35:00 -04:00
rde Remove obsolete TransferData.extendedRegistrationYears 2017-03-21 15:35:00 -04:00
request Cut over to generating new HMAC-based XSRF tokens 2017-03-13 11:22:56 -04:00
security Remove XsrfTokenManager fallback for validating legacy tokens 2017-03-21 15:36:31 -04:00
server Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
testing Add EppResource diffing to AbstractEppResourceSubject.isEqualTo() 2017-03-27 13:07:22 -04:00
tldconfig/idn Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tmch Fix accidentally non-@Tested TmchXmlSignature test 2017-03-27 13:02:46 -04:00
tools Add a Nomulus command to set domain create restricted status 2017-03-21 15:43:52 -04:00
ui Refactor a few new XsrfTokenManager methods 2017-03-07 13:24:21 -05:00
util Rename .toString and .equals to be less confusing. 2017-03-21 15:06:44 -04:00
whois Remove the ofy().load() inside of HostResource.cloneProjectedAtTime 2017-03-13 11:22:55 -04:00
xjc Add mapper to import domains from RDE deposits 2017-02-06 16:46:46 -05:00
xml Update copyright year on all license headers 2017-02-02 16:27:22 -05:00