Coverage Report - org.eclipse.swtbot.swt.finder.utils.TextDescription
 
Classes in this File Line Coverage Branch Coverage Complexity
TextDescription
100%
5/5
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.utils;
 12  
 
 13  
 import org.hamcrest.Description;
 14  
 import org.hamcrest.SelfDescribing;
 15  
 
 16  
 /**
 17  
  * Writes a fixed string as a description.
 18  
  * 
 19  
  * @author Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
 20  
  * @version $Id$
 21  
  */
 22  
 public class TextDescription implements SelfDescribing {
 23  
 
 24  
         private final String        description;
 25  
 
 26  
         /**
 27  
          * @param description the description returned as is.
 28  
          */
 29  13
         public TextDescription(String description) {
 30  13
                 this.description = description;
 31  13
         }
 32  
 
 33  
         public void describeTo(Description description) {
 34  98
                 description.appendText(this.description);
 35  98
         }
 36  
 
 37  
 }