source: extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java @ 9878

Last change on this file since 9878 was 9878, checked in by mlg, 13 years ago

Fixes one major display bug
There were displays bugs with the horizontal splitpane where trying to resize it.
I have fixed by changing the original scale (1.0 to 0.99). Don't know why I had to do this, bug it seems to fix the bug
Fixes an other bug in the image browser : the image list was kept when browsing through the different categories.

File size: 1.1 KB
Line 
1package fr.mael.jiwigo.service;
2
3import java.util.List;
4
5import org.junit.Test;
6
7import fr.mael.jiwigo.Main;
8import fr.mael.jiwigo.TestBase;
9import fr.mael.jiwigo.om.Category;
10import fr.mael.jiwigo.om.Comment;
11import fr.mael.jiwigo.om.Image;
12
13public class ServicesTest extends TestBase {
14
15    public ServicesTest() {
16        super();
17    }
18
19    @Test
20    public void testCreer() throws Exception {
21        Category cat = null;
22        for (Category category : CategoryService.getInstance(Main.sessionManager).list(true)) {
23            if (category.getIdentifier().equals(3)) {
24                cat = category;
25                break;
26            }
27        }
28
29        Image image = ImageService.getInstance(Main.sessionManager).listByCategory(cat.getIdentifier(), true).get(0);
30        List<Comment> comments = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier());
31        //      int firstCount = comments.size();
32        CommentService.getInstance(Main.sessionManager).create("comment test", image.getIdentifier(), "none");
33        //      int secondCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();
34        //      Assert.assertSame(firstCount + 1, secondCount);
35    }
36}
Note: See TracBrowser for help on using the repository browser.