View Javadoc

1   /*
2   This project provide access to non public fields
3   and methods as help for writing tests.
4   Copyright (C) 2007  Christof Lehmann
5   
6   This program is free software; you can redistribute it and/or
7   modify it under the terms of the GNU General Public License
8   as published by the Free Software Foundation; either version 2
9   of the License, or (at your option) any later version.
10  
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15  
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19   */
20  package net.sf.testextensions;
21  
22  /**
23   * The interface <code>AccessField</code> defines the methods
24   * for accessing a member.
25   * @author forge-cl
26   *
27   */
28  public interface AccessField {
29  
30  	/**
31  	 * The method <code>setValue</code> set the selected
32  	 * field to the given value.
33  	 * @param aNewValue the value, which should the selected
34  	 * field contains after this method call.
35  	 * @throws TestExtensionException if the dstValue does not
36  	 * suite to the field or any other exception occures.
37  	 */
38  	void setValue(final Object aNewValue) throws TestExtensionException;
39  
40  	/**
41  	 * The method <code>getValue</code> give the value of the
42  	 * selected field.
43  	 * @return the value of the selected field.
44  	 * @throws TestExtensionException shows, that an error
45  	 * occures during field access.
46  	 */
47  	Object getValue() throws TestExtensionException;
48  }