Commit graph

16 commits

Author SHA1 Message Date
cpovirk
8798cfb4a9 Use new Truth failWithActual() method
Migrate Truth subjects from the old fail(String, Object) to the new failWithActual(String, Object), tweaking verbs for the new grammar.

Before:
  fail("has foo", expected);

After:
  failWithActual("expected to have foo", expected);

Open-source note: The fail*() methods used by this CL were added in Truth 0.41.

More information:
  []
Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244418884
2019-04-22 12:57:49 -04:00
mcilwain
f58211402a Add an unrenew_domain command to nomulus tool
This is used to reduce the expiration time of domain(s) by some number of years
(if enough length remains in the registration term to do so). This does not back
out the previously saved BillingEvent entities as they may have already been
sent out and invoiced, so any related refunds must be handled out of band.

In addition to reducing the registration expiration time on the domain itself,
this command writes out a new history entry, one-time poll message informing the
registrar of this change, auto-renew billing event and poll message, and
updates/ends the old auto-renew billing event and poll message.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=224999285
2018-12-12 13:22:34 -05:00
cpovirk
220f7589f5 Mark actualCustomStringRepresentation() as @ForOverride.
The intention (from []is:
- actualAsString() is the method that people call.
- actualCustomStringRepresentation() is the method that people override.

Fortunately, no one actually calls actualCustomStringRepresentation(), aside from some tests that call it to test a subject's implementation. That's easy enough to work around by extracting a method.
(Arguably @ForOverride should permit calls from tests in some cases (now that Error Prone knows how to identify test code). But it's not entirely clear, since, e.g., people shouldn't be testing Converter.doForward(null) because the method can never be invoked that way. Some discussion here: []Tested:
global TAP
[]
RELNOTES=Marked `actualCustomStringRepresentation()` as `@ForOverride`. To retrieve the string representation, call `actualAsString()`.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185672328
2018-02-20 15:46:53 -05:00
jianglai
9ab68613a0 Replace FailureStrategy with FailureMetadata in gtld's Subjects
Also changed truth.SubjectFactory to truth.Subject.Factory (plain renaming) and use method reference instead of anonymous class to create the factory when applicable.

FailureMetadata, an opaque object to its users, is introduced to replace FailureStrategy in in custom Subject in order to resolve some existing flaws of FailureStrategy as well as enable new features to be added to Truth.

New API is available in Truth-0.36, if there is a build/pom.xml, it's also updated to use this version.

More information: See []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176110788
2017-11-21 18:39:45 -05:00
mcilwain
c0f8da0c6e Switch from Guava Optionals to Java 8 Optionals
This was a surprisingly involved change. Some of the difficulties included
java.util.Optional purposely not being Serializable (so I had to move a
few Optionals in mapreduce classes to @Nullable) and having to add the Truth
Java8 extension library for assertion support.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171863777
2017-10-24 16:53:47 -04:00
jijiang
211d89695a Migrate from old *Verb* classes to new *SubjectBuilder* classes
This migration does not change any behavior.

More information: []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168248439
2017-09-12 15:51:58 -04:00
mmuller
b70f57b7c7 Update copyright year on all license headers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146111211
2017-02-02 16:27:22 -05:00
mountford
0dbaa8e5bc Remove misleading comment
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144485773
2017-01-18 11:10:00 -05:00
Ben Kelsey
44972b916a Add otherClientId to HistoryEntry
This CL adds an otherClientId field to be populated on domain transfers with client ID of the other end of the transaction (losing registrar for requests and cancels, gaining registrar for approves and rejects). This will be used for reporting in compliance with specification 3 of the ICANN registry agreement.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143775945
2017-01-09 12:00:34 -05:00
mountford
527668c1b0 Remove infinite recursion in HistoryEntrySubject
The HistoryEntrySubject.actualCustomStringRepresentation() was calling a superclass method which ultimately called HistoryEntrySubject.actualCustomStringRepresentation(). So any test which failed due to a HistoryEntry problem resulted in a stack overflow error instead of a more helpful error indicating the actual problem. The solution is not to call the superclass method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143702856
2017-01-09 11:59:04 -05:00
shikhman
f76bc70f91 Preserve test logs and test summary output for Kokoro CI runs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135494972
2016-10-14 16:57:43 -04:00
cgoldfeder
fabbf8871c Fix more deprecated methods in truth tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135481064
2016-10-07 15:29:49 -04:00
ctingue
3525205984 Replace Truth's deprecated getSubject() method with actual()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135361382
2016-10-07 14:38:31 -04:00
mcilwain
aa2f283f7c Convert entire project to strict lexicographical import sort ordering
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127234970
2016-07-13 15:59:53 -04:00
Michael Muller
c458c05801 Rename Java packages to use the .google TLD
The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
2016-05-13 20:04:42 -04:00
Justine Tunney
5012893c1d mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package
rename. The repository is now in a broken state because the code
itself hasn't been updated. However this should ensure that git
correctly preserves history for each file.
2016-05-13 18:55:08 -04:00
Renamed from javatests/com/google/domain/registry/testing/HistoryEntrySubject.java (Browse further)