Last change
on this file since 9393 was
9393,
checked in by mlg, 13 years ago
|
Modifications to use the last version of jiwigo-ws-api
|
File size:
869 bytes
|
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 | |
---|
14 | public class CategoryServiceTest extends TestBase { |
---|
15 | public CategoryServiceTest() { |
---|
16 | super(); |
---|
17 | } |
---|
18 | |
---|
19 | /** |
---|
20 | * Test of the listing method |
---|
21 | */ |
---|
22 | @Test |
---|
23 | public void ListerTest() { |
---|
24 | try { |
---|
25 | CategoryDao.getInstance(Main.sessionManager).list(true); |
---|
26 | CategoryDao.getInstance(Main.sessionManager).list(false); |
---|
27 | } catch (IOException e) { |
---|
28 | e.printStackTrace(); |
---|
29 | } |
---|
30 | } |
---|
31 | |
---|
32 | /** |
---|
33 | * Test of the creation method |
---|
34 | */ |
---|
35 | @Test |
---|
36 | public void creerTest() { |
---|
37 | Date date = new Date(); |
---|
38 | Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).create("Category" + date.getTime())); |
---|
39 | } |
---|
40 | |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.