Last change
on this file since 9921 was
9921,
checked in by mlg, 13 years ago
|
Adds spring for the dependency injection
Deletion of jdom (not useful just for a class that manipulates a simple XML file)
|
File size:
776 bytes
|
Line | |
---|
1 | package fr.mael.jiwigo; |
---|
2 | |
---|
3 | import junit.framework.Assert; |
---|
4 | |
---|
5 | import org.junit.Test; |
---|
6 | |
---|
7 | import fr.mael.jiwigo.transverse.session.SessionManager; |
---|
8 | import fr.mael.jiwigo.transverse.util.spring.SpringUtils; |
---|
9 | |
---|
10 | public class TestBase { |
---|
11 | public TestBase() { |
---|
12 | SessionManager sessionManager = SpringUtils.getSessionManager(); |
---|
13 | sessionManager.setLogin("mael"); |
---|
14 | sessionManager.setPassword("motdepasse"); |
---|
15 | sessionManager.setUrl("http://mael.piwigo.com/ws.php"); |
---|
16 | if (sessionManager.processLogin() != 0) { |
---|
17 | try { |
---|
18 | throw new Exception("Connection failed"); |
---|
19 | } catch (Exception e) { |
---|
20 | e.printStackTrace(); |
---|
21 | } |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | /** |
---|
26 | * Fake test so that maven assembly plugin's build does not fail |
---|
27 | */ |
---|
28 | @Test |
---|
29 | public void fakeTest() { |
---|
30 | Assert.assertSame(true, true); |
---|
31 | } |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.