Ignore:
Timestamp:
Feb 26, 2011, 5:26:27 PM (14 years ago)
Author:
mlg
Message:

All services have been removed from this project to be integrated in a new project : jiwigo-ws-api (not yet on the svn).
The current project now uses jiwigo-ws-api as a maven dependency (explanations can be found here : http://www.jiwigo.com/api.html )

Location:
extensions/jiwigo/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk

    • Property svn:ignore set to
      bin
      target
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java

    r6963 r9385  
    88import org.junit.Test;
    99
     10import fr.mael.jiwigo.Main;
    1011import fr.mael.jiwigo.TestBase;
    1112import fr.mael.jiwigo.dao.CategoryDao;
     
    2223    public void ListerTest() {
    2324        try {
    24             CategoryDao.getInstance().lister(true);
    25             CategoryDao.getInstance().lister(false);
     25            CategoryDao.getInstance(Main.sessionManager).lister(true);
     26            CategoryDao.getInstance(Main.sessionManager).lister(false);
    2627        } catch (IOException e) {
    2728            e.printStackTrace();
     
    3536    public void creerTest() {
    3637        Date date = new Date();
    37         Assert.assertSame(true, CategoryService.getInstance().creer("Category" + date.getTime()));
     38        Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).creer("Category" + date.getTime()));
    3839    }
    3940
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java

    r6963 r9385  
    55import org.junit.Test;
    66
     7import fr.mael.jiwigo.Main;
    78import fr.mael.jiwigo.TestBase;
    89import fr.mael.jiwigo.om.Category;
     
    1819    public void testCreer() throws Exception {
    1920        Category cat = null;
    20         for (Category category : CategoryService.getInstance().lister(true)) {
     21        for (Category category : CategoryService.getInstance(Main.sessionManager).lister(true)) {
    2122            if (category.getIdentifiant().equals(3)) {
    2223                cat = category;
     
    2425            }
    2526        }
    26         Image image = ImageService.getInstance().listerParCategory(cat.getIdentifiant(), true).get(0);
    27         int firstCount = CommentService.getInstance().lister(image.getIdentifiant()).size();
    28         CommentService.getInstance().creer("comment test", image.getIdentifiant(), "none");
    29         Assert.assertSame(firstCount + 1, CommentService.getInstance().lister(image.getIdentifiant()).size());
     27        Image image = ImageService.getInstance(Main.sessionManager).listerParCategory(cat.getIdentifiant(), true)
     28                .get(0);
     29        int firstCount = CommentService.getInstance(Main.sessionManager).lister(image.getIdentifiant()).size();
     30        CommentService.getInstance(Main.sessionManager).creer("comment test", image.getIdentifiant(), "none");
     31        Assert.assertSame(firstCount + 1, CommentService.getInstance(Main.sessionManager)
     32                .lister(image.getIdentifiant()).size());
    3033    }
    3134}
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java

    r6964 r9385  
    88import org.junit.Test;
    99
     10import fr.mael.jiwigo.Main;
    1011import fr.mael.jiwigo.TestBase;
    1112import fr.mael.jiwigo.dao.TagDao;
     
    2324    public void ListerTest() {
    2425        try {
    25             TagDao.getInstance().lister();
     26            TagDao.getInstance(Main.sessionManager).lister();
    2627        } catch (IOException e) {
    2728            e.printStackTrace();
     
    3637        Date date = new Date();
    3738        try {
    38             Assert.assertSame(true, TagService.getInstance().creer("Tag" + date.getTime()));
     39            Assert.assertSame(true, TagService.getInstance(Main.sessionManager).creer("Tag" + date.getTime()));
    3940        } catch (IOException e) {
    4041            // TODO Auto-generated catch block
Note: See TracChangeset for help on using the changeset viewer.