mirror of
https://github.com/google/nomulus
synced 2026-09-19 06:32:00 +00: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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user