gvsig-plugintemplates / org.gvsig.fortunecookies / trunk / basic-with-user-interface / org.gvsig.fortunecookies / org.gvsig.fortunecookies.swing / org.gvsig.fortunecookies.swing.api / src / test / java / org / gvsig / fortunecookies / swing / FortuneCookieSwingManagerTest.java @ 185
History | View | Annotate | Download (2.1 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.fortunecookies.swing; |
23 |
|
24 |
import org.gvsig.fortunecookies.FortuneCookieLocator; |
25 |
import org.gvsig.fortunecookies.FortuneCookieManager; |
26 |
import org.gvsig.fortunecookies.FortuneCookieService; |
27 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase; |
28 |
import org.gvsig.tools.service.ServiceException; |
29 |
|
30 |
/**
|
31 |
* API compatibility tests for {@link FortuneCookieSwingManager}
|
32 |
* implementations.
|
33 |
*
|
34 |
* @author gvSIG Team
|
35 |
* @version $Id$
|
36 |
*/
|
37 |
public abstract class FortuneCookieSwingManagerTest extends |
38 |
AbstractLibraryAutoInitTestCase { |
39 |
|
40 |
protected FortuneCookieManager manager;
|
41 |
protected FortuneCookieSwingManager swingManager;
|
42 |
|
43 |
@Override
|
44 |
protected void doSetUp() throws Exception { |
45 |
manager = FortuneCookieLocator.getManager(); |
46 |
swingManager = FortuneCookieSwingLocator.getSwingManager(); |
47 |
} |
48 |
|
49 |
public void testGetManager() { |
50 |
assertEquals(manager, swingManager.getManager()); |
51 |
} |
52 |
|
53 |
public void testCreationJFortuneCookieServicePanel() |
54 |
throws ServiceException {
|
55 |
FortuneCookieService cookie = manager.getFortuneCookieService(); |
56 |
|
57 |
JFortuneCookieServicePanel panel1 = |
58 |
swingManager.createFortuneCookie(cookie); |
59 |
|
60 |
assertNotNull(panel1); |
61 |
} |
62 |
|
63 |
} |