Coverage Report - org.eclipse.swtbot.swt.finder.waits.ICondition
 
Classes in this File Line Coverage Branch Coverage Complexity
ICondition
N/A
N/A
1
 
 1  
 /*******************************************************************************
 2  
  * Copyright (c) 2008 Ketan Padegaonkar and others.
 3  
  * All rights reserved. This program and the accompanying materials
 4  
  * are made available under the terms of the Eclipse Public License v1.0
 5  
  * which accompanies this distribution, and is available at
 6  
  * http://www.eclipse.org/legal/epl-v10.html
 7  
  * 
 8  
  * Contributors:
 9  
  *     Ketan Padegaonkar - initial API and implementation
 10  
  *******************************************************************************/
 11  
 package org.eclipse.swtbot.swt.finder.waits;
 12  
 
 13  
 import org.eclipse.swtbot.swt.finder.SWTBot;
 14  
 
 15  
 /**
 16  
  * @author Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
 17  
  * @see Conditions
 18  
  * @version $Id$
 19  
  * @since 1.2
 20  
  */
 21  
 public interface ICondition {
 22  
 
 23  
         /**
 24  
          * Tests if the condition has been met.
 25  
          * 
 26  
          * @return <code>true</code> if the condition is satisfied, <code>false</code> otherwise.
 27  
          * @throws Exception if the test encounters an error while processing the check.
 28  
          */
 29  
         boolean test() throws Exception;
 30  
 
 31  
         /**
 32  
          * Initializes the condition with the given {@link SWTBot} instance. This should never be <code>null</code>.
 33  
          * 
 34  
          * @param bot the SWTBot instance that this instance may use to evaluate the test.
 35  
          */
 36  
         void init(SWTBot bot);
 37  
 
 38  
         /**
 39  
          * Gets the failure message when a test fails (returns <code>false</code>).
 40  
          * 
 41  
          * @return the failure message to show in case the test fails.
 42  
          */
 43  
         String getFailureMessage();
 44  
 }