mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 06:14:54 +02:00
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 |
||
---|---|---|
.. | ||
mapreduce | ||
sftp | ||
testdata | ||
AbstractDomainBaseSubject.java | ||
AbstractEppResourceSubject.java | ||
AppEngineRule.java | ||
BouncyCastleProviderRule.java | ||
BUILD | ||
CertificateSamples.java | ||
ContactResourceSubject.java | ||
DatastoreHelper.java | ||
default_premium_list_testdata.csv | ||
DeterministicStringGenerator.java | ||
DomainApplicationSubject.java | ||
DomainResourceSubject.java | ||
EppExceptionSubject.java | ||
EppLoader.java | ||
ExceptionRule.java | ||
FailAnswer.java | ||
FakeClock.java | ||
FakeHttpSession.java | ||
FakeJsonResponse.java | ||
FakeKeyringModule.java | ||
FakeOAuthService.java | ||
FakeResponse.java | ||
FakeServletInputStream.java | ||
FakeServletOutputStream.java | ||
FakeSleeper.java | ||
FakeURLFetchService.java | ||
FakeUserService.java | ||
ForwardingURLFetchService.java | ||
FullFieldsTestEntityHelper.java | ||
GcsTestingUtils.java | ||
GenericEppResourceSubject.java | ||
GpgSystemCommandRule.java | ||
HistoryEntrySubject.java | ||
HostResourceSubject.java | ||
InjectRule.java | ||
IoSpyRule.java | ||
logging.properties | ||
LogsSubject.java | ||
package-info.java | ||
Providers.java | ||
ReflectiveFieldExtractor.java | ||
ReflectiveSubjectFactory.java | ||
ShardableTestCase.java | ||
SlurpAnswer.java | ||
SystemInfo.java | ||
SystemPropertyRule.java | ||
TaskQueueHelper.java | ||
TestDataHelper.java | ||
TestObject.java | ||
TruthChainer.java | ||
UriParameters.java | ||
UserInfo.java |