net.sf.webphotos.gui.util.uispec4j
Class WebPhotosDelegate

java.lang.Object
  extended by net.sf.webphotos.gui.util.uispec4j.WebPhotosDelegate
All Implemented Interfaces:
WebPhotosDelegate

public class WebPhotosDelegate
extends Object
implements WebPhotosDelegate

Author:
Guilherme

Method Summary
 void addPhotosToAlbumAndCheck(String[] fileNames, String buttonName, File folderNameToVerify, String fileDialogName)
           
 void checkButtonHasText(String button, String textShown)
          Tests Button Text
 void checkComboBoxHasText(String comboBoxName, String textShown)
          Tests Combox Text
 void checkIsButtonEnabled(String button)
          Tests Button
 void checkNewAlbum()
          It validates album insertion
 void fillAlbumForm(String albumTitle, String albumDescription, String categoryName, Map<String,String[]> photoData)
          Fill up a new album using a pre-defined category, credits and added photos
 void fillModalWithText(String buttonName, String modalTittle, String data)
          Writes text to a Modal Dialog
static WebPhotosDelegate getWebPhotosDelegate()
          Returns the Delegate
 void setUp()
          Setup one Test
 void setUpClass()
          Prepare all tests
 void tearDownClass()
          Dispose all tests
 void validateMainWindowIsPresent()
          Tests mainWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkIsButtonEnabled

public void checkIsButtonEnabled(String button)
                          throws RuntimeException
Tests Button

Specified by:
checkIsButtonEnabled in interface WebPhotosDelegate
Parameters:
button -
Throws:
RuntimeException - no errors allowed

checkButtonHasText

public void checkButtonHasText(String button,
                               String textShown)
                        throws RuntimeException
Tests Button Text

Specified by:
checkButtonHasText in interface WebPhotosDelegate
Parameters:
button -
textShown -
Throws:
RuntimeException - no errors allowed

checkComboBoxHasText

public void checkComboBoxHasText(String comboBoxName,
                                 String textShown)
                          throws RuntimeException
Tests Combox Text

Specified by:
checkComboBoxHasText in interface WebPhotosDelegate
Parameters:
comboBoxName -
textShown -
Throws:
RuntimeException - no errors allowed

validateMainWindowIsPresent

public void validateMainWindowIsPresent()
                                 throws RuntimeException
Tests mainWindow

Specified by:
validateMainWindowIsPresent in interface WebPhotosDelegate
Throws:
RuntimeException

tearDownClass

public void tearDownClass()
                   throws Exception
Dispose all tests

Specified by:
tearDownClass in interface WebPhotosDelegate
Throws:
Exception - no errors allowed

setUpClass

public void setUpClass()
                throws Exception
Prepare all tests

Specified by:
setUpClass in interface WebPhotosDelegate
Throws:
Exception - no errors allowed

addPhotosToAlbumAndCheck

public void addPhotosToAlbumAndCheck(String[] fileNames,
                                     String buttonName,
                                     File folderNameToVerify,
                                     String fileDialogName)
                              throws RuntimeException
Specified by:
addPhotosToAlbumAndCheck in interface WebPhotosDelegate
Parameters:
fileNames -
buttonName -
folderNameToVerify -
fileDialogName -
Throws:
RuntimeException - no errors allowed

fillModalWithText

public void fillModalWithText(String buttonName,
                              String modalTittle,
                              String data)
                       throws RuntimeException
Writes text to a Modal Dialog

Specified by:
fillModalWithText in interface WebPhotosDelegate
Parameters:
buttonName -
modalTittle -
data -
Throws:
RuntimeException - no errors allowed

getWebPhotosDelegate

public static WebPhotosDelegate getWebPhotosDelegate()
Returns the Delegate

Returns:

setUp

public void setUp()
Setup one Test

Specified by:
setUp in interface WebPhotosDelegate

fillAlbumForm

public void fillAlbumForm(String albumTitle,
                          String albumDescription,
                          String categoryName,
                          Map<String,String[]> photoData)
Description copied from interface: WebPhotosDelegate
Fill up a new album using a pre-defined category, credits and added photos

Specified by:
fillAlbumForm in interface WebPhotosDelegate

checkNewAlbum

public void checkNewAlbum()
Description copied from interface: WebPhotosDelegate
It validates album insertion

Specified by:
checkNewAlbum in interface WebPhotosDelegate


Copyright © 2008-2012. All Rights Reserved.