Make Hello flows use the flow "now" time

This cleans up some of the tests, and helps with
future injection CLs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124208164
This commit is contained in:
Corey Goldfeder 2016-06-06 20:41:37 -07:00 committed by Justine Tunney
parent 81dc55ceab
commit 5a2f63cf58
7 changed files with 30 additions and 19 deletions

View file

@ -14,8 +14,6 @@
package google.registry.model.eppoutput;
import static org.joda.time.DateTimeZone.UTC;
import google.registry.model.ImmutableObject;
import google.registry.model.eppcommon.PresenceMarker;
import google.registry.model.eppcommon.ProtocolDefinition;
@ -37,7 +35,7 @@ import javax.xml.bind.annotation.XmlElementWrapper;
public class Greeting extends ImmutableObject implements ResponseOrGreeting {
String svID = "Charleston Road Registry";
DateTime svDate = DateTime.now(UTC);
DateTime svDate;
/** This is never changed, so it might as well be static for efficiency. */
@XmlElement
@ -47,6 +45,12 @@ public class Greeting extends ImmutableObject implements ResponseOrGreeting {
@XmlElement
static Dcp dcp = new Dcp();
public static Greeting create(DateTime svDate) {
Greeting instance = new Greeting();
instance.svDate = svDate;
return instance;
}
static class SvcMenu extends ImmutableObject {
String version = ProtocolDefinition.VERSION;
String lang = ProtocolDefinition.LANGUAGE;