Here is complete valid example of verifying that a maintenance default action issues a proper warning.
public void testDefaultDEFAULT_FOR_ZONE_HNDL() { PageBody input = new PageBody(); input.put(ContentZoneMaintenance.STRUCTURE.ZONE_CD, "CI_AFH"); // test the default and expect to get a warning try { executeDefault(input, "ZH"); fail("Should have a warning"); } catch (ApplicationWarning e) { verifyWarningContains(e, MessageRepository.deleteZoneParametersWarning()); } disableWarnings(); // test the default and do not expect to get a warning or error PageBody output = executeDefault(input, "ZH"); assertEquals(Boolean.TRUE, output.get("DELETE_SW")); }
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.