com.atlassian.jira.webtests.table
Class ImageCell

java.lang.Object
  extended by com.atlassian.jira.webtests.table.AbstractSimpleCell
      extended by com.atlassian.jira.webtests.table.ImageCell
All Implemented Interfaces:
SimpleCell

public class ImageCell
extends AbstractSimpleCell

This is used with the JIRAWebTest.tableRowEquals(com.meterware.httpunit.WebTable, int, java.util.List) to check if an image with given url exists in a specified table cell.


Constructor Summary
ImageCell(String url)
           
 
Method Summary
 boolean equals(com.meterware.httpunit.WebTable table, int row, int col)
          Checks if there are any image (<img src="url">) tag in the specified row and col (cell) of the table which contains the url.
 String getCellAsText(com.meterware.httpunit.WebTable table, int row, int col)
          WebTable.getCellAsText(int, int) returns the text of the cell only.
 String getUrl()
           
 String toString()
           
 
Methods inherited from class com.atlassian.jira.webtests.table.AbstractSimpleCell
log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageCell

public ImageCell(String url)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getUrl

public String getUrl()

getCellAsText

public String getCellAsText(com.meterware.httpunit.WebTable table,
                            int row,
                            int col)
Description copied from interface: SimpleCell
WebTable.getCellAsText(int, int) returns the text of the cell only. Using this in log statements is often useless because it does not give interesting information. Eg. ImageCell will return the cells information about the image rather than the text.

Specified by:
getCellAsText in interface SimpleCell
Overrides:
getCellAsText in class AbstractSimpleCell
Parameters:
table - table
row - row index (starting from 0)
col - col index (starting from 0)
Returns:
String representing the WebTable cell that is interesting to this SimpleCell

equals

public boolean equals(com.meterware.httpunit.WebTable table,
                      int row,
                      int col)
Checks if there are any image (<img src="url">) tag in the specified row and col (cell) of the table which contains the url. If the url is null, then it checks that there are no image tags at all in the table cell.

Parameters:
table - table to compare
row - row index of table
col - column index of table
Returns:
true if there is an image with given url in the table cell (row, col)


Copyright © 2002-2014 Atlassian. All Rights Reserved.