mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add a missing test to ContactUpdateFlow
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133000632
This commit is contained in:
parent
68cdd04124
commit
04fd14995e
3 changed files with 49 additions and 0 deletions
|
@ -29,6 +29,7 @@ import javax.inject.Inject;
|
|||
* An EPP flow that updates a contact resource.
|
||||
*
|
||||
* @error {@link google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException}
|
||||
* @error {@link google.registry.flows.ResourceUpdateFlow.AddRemoveSameValueEppException}
|
||||
* @error {@link google.registry.flows.ResourceMutateFlow.ResourceToMutateDoesNotExistException}
|
||||
* @error {@link google.registry.flows.ResourceUpdateFlow.ResourceHasClientUpdateProhibitedException}
|
||||
* @error {@link google.registry.flows.ResourceUpdateFlow.StatusNotClientSettableException}
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException;
|
||||
import google.registry.flows.ResourceMutateFlow.ResourceToMutateDoesNotExistException;
|
||||
import google.registry.flows.ResourceUpdateFlow.AddRemoveSameValueEppException;
|
||||
import google.registry.flows.ResourceUpdateFlow.ResourceHasClientUpdateProhibitedException;
|
||||
import google.registry.flows.ResourceUpdateFlow.StatusNotClientSettableException;
|
||||
import google.registry.flows.SingleResourceFlow.ResourceStatusProhibitsOperationException;
|
||||
|
@ -258,4 +259,12 @@ public class ContactUpdateFlowTest
|
|||
persistActiveContact(getUniqueIdFromCommand());
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_addRemoveSameValue() throws Exception {
|
||||
thrown.expect(AddRemoveSameValueEppException.class);
|
||||
setEppInput("contact_update_add_remove_same.xml");
|
||||
persistActiveContact(getUniqueIdFromCommand());
|
||||
runFlow();
|
||||
}
|
||||
}
|
||||
|
|
39
javatests/google/registry/flows/contact/testdata/contact_update_add_remove_same.xml
vendored
Normal file
39
javatests/google/registry/flows/contact/testdata/contact_update_add_remove_same.xml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<contact:update
|
||||
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
|
||||
<contact:id>sh8013</contact:id>
|
||||
<contact:add>
|
||||
<contact:status s="clientDeleteProhibited"/>
|
||||
</contact:add>
|
||||
<contact:rem>
|
||||
<contact:status s="clientDeleteProhibited"/>
|
||||
</contact:rem>
|
||||
<contact:chg>
|
||||
<contact:postalInfo type="int">
|
||||
<contact:org/>
|
||||
<contact:addr>
|
||||
<contact:street>124 Example Dr.</contact:street>
|
||||
<contact:street>Suite 200</contact:street>
|
||||
<contact:city>Dulles</contact:city>
|
||||
<contact:sp>VA</contact:sp>
|
||||
<contact:pc>20166-6503</contact:pc>
|
||||
<contact:cc>US</contact:cc>
|
||||
</contact:addr>
|
||||
</contact:postalInfo>
|
||||
<contact:voice>+1.7034444444</contact:voice>
|
||||
<contact:fax/>
|
||||
<contact:authInfo>
|
||||
<contact:pw>2fooBAR</contact:pw>
|
||||
</contact:authInfo>
|
||||
<contact:disclose flag="1">
|
||||
<contact:voice/>
|
||||
<contact:email/>
|
||||
</contact:disclose>
|
||||
</contact:chg>
|
||||
</contact:update>
|
||||
</update>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue