001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.testtools.common; 017 018/** 019 * <p> 020 * Used by {@see JiraAwareFailureUtils} to fail tests in a Jira aware way. 021 * </p> 022 * @author Kuali Rice Team (rice.collab@kuali.org) 023 */ 024public interface JiraAwareFailable { 025 026 /** 027 * <p> 028 * Fail in a framework appropriate way, should not call jiraAwareFail. 029 * </p> 030 * 031 * @param message to display for the failure. 032 */ 033 void fail(String message); 034 035 /** 036 * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement 037 * typically would be a call to {@see JiraAwareUtil#fail(String, String, JiraAwareFailable} to check for Jira matches. 038 * 039 * @param message to check for a Jira match and fail with. 040 */ 041 void jiraAwareFail(String message); 042 043 /** 044 * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement 045 * typically would be a call to {@see JiraAwareUtil#fail(String, String, JiraAwareFailable} to check for Jira matches. 046 * 047 * @param contents to check for a Jira match 048 * @param message to check for a Jira match and fail with. 049 */ 050 void jiraAwareFail(String contents, String message); 051 052 /** 053 * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement 054 * typically would be a call to {@see JiraAwareUtil#fail(String, String, Throwable, JiraAwareFailable} to check for Jira matches. 055 * 056 * @param contents to check for a Jira match 057 * @param message to check for a Jira match and fail with. 058 * @param throwable to check for a Jira match 059 */ 060 void jiraAwareFail(String contents, String message, Throwable throwable); 061}