Last change
on this file since 9431 was
9431,
checked in by mlg, 13 years ago
|
Modifications to use the last version of jiwigo-ws-api which manages proxy errors.
|
File size:
1.1 KB
|
Line | |
---|
1 | package fr.mael.jiwigo.service; |
---|
2 | |
---|
3 | import java.io.IOException; |
---|
4 | import java.util.Date; |
---|
5 | |
---|
6 | import junit.framework.Assert; |
---|
7 | |
---|
8 | import org.junit.Test; |
---|
9 | |
---|
10 | import fr.mael.jiwigo.Main; |
---|
11 | import fr.mael.jiwigo.TestBase; |
---|
12 | import fr.mael.jiwigo.dao.CategoryDao; |
---|
13 | import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; |
---|
14 | |
---|
15 | public class CategoryServiceTest extends TestBase { |
---|
16 | public CategoryServiceTest() { |
---|
17 | super(); |
---|
18 | } |
---|
19 | |
---|
20 | /** |
---|
21 | * Test of the listing method |
---|
22 | * @throws ProxyAuthenticationException |
---|
23 | */ |
---|
24 | @Test |
---|
25 | public void ListerTest() throws ProxyAuthenticationException { |
---|
26 | try { |
---|
27 | CategoryDao.getInstance(Main.sessionManager).list(true); |
---|
28 | CategoryDao.getInstance(Main.sessionManager).list(false); |
---|
29 | } catch (IOException e) { |
---|
30 | e.printStackTrace(); |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | /** |
---|
35 | * Test of the creation method |
---|
36 | * @throws ProxyAuthenticationException |
---|
37 | */ |
---|
38 | @Test |
---|
39 | public void creerTest() throws ProxyAuthenticationException { |
---|
40 | Date date = new Date(); |
---|
41 | Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).create("Category" + date.getTime())); |
---|
42 | } |
---|
43 | |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.