View Javadoc

1   /**
2    * Copyright 2008 WebPhotos
3    *
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 net.sf.webphotos.gui.util;
17  
18  import java.io.File;
19  import java.util.Map;
20  
21  /**
22   *
23   * @author Guilherme
24   */
25  public interface WebPhotosDelegate {
26  
27      /**
28       *
29       * @param fileNames
30       * @param buttonName
31       * @param folderNameToVerify
32       * @param fileDialogName
33       * @throws RuntimeException no errors allowed
34       */
35      void addPhotosToAlbumAndCheck(final String[] fileNames, final String buttonName, final File folderNameToVerify, final String fileDialogName) throws RuntimeException;
36  
37      /**
38       * Tests Button Text
39       * @param button
40       * @param textShown
41       * @throws RuntimeException no errors allowed
42       */
43      void checkButtonHasText(final String button, final String textShown) throws RuntimeException;
44  
45      /**
46       * Tests Combox Text
47       * @param comboBoxName
48       * @param textShown
49       * @throws RuntimeException no errors allowed
50       */
51      void checkComboBoxHasText(final String comboBoxName, final String textShown) throws RuntimeException;
52  
53      /**
54       * Tests Button
55       * @param button
56       * @throws RuntimeException no errors allowed
57       */
58      void checkIsButtonEnabled(final String button) throws RuntimeException;
59  
60      /**
61       * Writes text to a Modal Dialog
62       * @param buttonName
63       * @param modalTittle
64       * @param data
65       * @throws RuntimeException no errors allowed
66       */
67      void fillModalWithText(final String buttonName, final String modalTittle, final String data) throws RuntimeException;
68  
69      /**
70       * Prepare all tests
71       * @throws Exception no errors allowed
72       */
73      void setUpClass() throws Exception;
74  
75      /**
76       * Dispose all tests
77       * @throws Exception no errors allowed
78       */
79      void tearDownClass() throws Exception;
80  
81      /**
82       * Tests mainWindow
83       */
84      void validateMainWindowIsPresent();
85  
86      /**
87       *
88       */
89      void setUp();
90  
91      /**
92       * Fill up a new album using a pre-defined category, credits and added photos
93       * @param albumTitle
94       * @param albumDescription
95       * @param categoryName
96       * @param photoData
97       */
98      public void fillAlbumForm(final String albumTitle, final String albumDescription, final String categoryName, final Map<String, String[]> photoData);
99  
100     /**
101      * It validates album insertion
102      */
103     public void checkNewAlbum();
104     
105 }