Refactor EppXmlTransformer to be in the model/ package

This will allow us to perform the OT&E history verification
in the model/ package as well so that it can be used both
by both the UI and the command line tool.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=225007167
This commit is contained in:
jianglai 2018-12-11 08:25:20 -08:00
parent f58211402a
commit 0a44ef0dca
27 changed files with 257 additions and 240 deletions

View file

@ -14,7 +14,7 @@
package google.registry.testing;
import static google.registry.flows.EppXmlTransformer.unmarshal;
import static google.registry.flows.FlowUtils.unmarshalEpp;
import static google.registry.testing.TestDataHelper.loadFile;
import static java.nio.charset.StandardCharsets.UTF_8;
@ -37,7 +37,12 @@ public class EppLoader {
}
public EppInput getEpp() throws EppException {
return unmarshal(EppInput.class, eppXml.getBytes(UTF_8));
/*
* TODO(b/120837374): we shouldn't use EppException in non-Flow tests. Find a way to use {@link
* google.registry.model.eppcommon.EppXmlTransformer#unmarshal(Class, byte[])} in those tests
* instead of {@link google.registry.flows.FlowUtils#unmarshalEpp(Class, byte[])}
*/
return unmarshalEpp(EppInput.class, eppXml.getBytes(UTF_8));
}
public String getEppXml() {