View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.testtools.common;
17  
18  /**
19   * <p>
20   * Used by {@see JiraAwareFailureUtils} to fail tests in a Jira aware way.
21   * </p>
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   */
24  public interface JiraAwareFailable {
25  
26      /**
27       * <p>
28       * Fail in a framework appropriate way, should not call jiraAwareFail.
29       * </p>
30       *
31       * @param message to display for the failure.
32       */
33      void fail(String message);
34  
35      /**
36       * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement
37       * typically would be a call to {@see JiraAwareUtil#fail(String, String, JiraAwareFailable} to check for Jira matches.
38       *
39       * @param message to check for a Jira match and fail with.
40       */
41      void jiraAwareFail(String message);
42  
43      /**
44       * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement
45       * typically would be a call to {@see JiraAwareUtil#fail(String, String, JiraAwareFailable} to check for Jira matches.
46       *
47       * @param contents to check for a Jira match
48       * @param message to check for a Jira match and fail with.
49       */
50      void jiraAwareFail(String contents, String message);
51  
52      /**
53       * jiraAwareFail is a hook to do things like checking for incident reports, 404s, 503s, etc, the last statement
54       * typically would be a call to {@see JiraAwareUtil#fail(String, String, Throwable, JiraAwareFailable} to check for Jira matches.
55       *
56       * @param contents to check for a Jira match
57       * @param message to check for a Jira match and fail with.
58       * @param throwable to check for a Jira match
59       */
60      void jiraAwareFail(String contents, String message, Throwable throwable);
61  }