mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Re-add assertions that EppExceptions marshal correctly
These checks were removed in [] and re-adding them is the last step of the migration to using expectThrows/assertThrows globally. Note that this is roughly half of them. More to come in a follow-up CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179216707
This commit is contained in:
parent
16a1d6d196
commit
da08baab92
17 changed files with 529 additions and 316 deletions
|
@ -15,8 +15,10 @@
|
|||
package google.registry.flows.session;
|
||||
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.FlowTestCase;
|
||||
import google.registry.flows.FlowUtils.NotLoggedInException;
|
||||
import org.junit.Before;
|
||||
|
@ -44,6 +46,7 @@ public class LogoutFlowTest extends FlowTestCase<LogoutFlow> {
|
|||
@Test
|
||||
public void testFailure() throws Exception {
|
||||
sessionMetadata.setClientId(null); // Turn off the implicit login
|
||||
assertThrows(NotLoggedInException.class, this::runFlow);
|
||||
EppException thrown = expectThrows(NotLoggedInException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue