Changeset 9385 for extensions/jiwigo/trunk/src/test
- Timestamp:
- Feb 26, 2011, 5:26:27 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk
-
Property
svn:ignore
set to
bin
target
-
Property
svn:ignore
set to
-
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java
r6963 r9385 8 8 import org.junit.Test; 9 9 10 import fr.mael.jiwigo.Main; 10 11 import fr.mael.jiwigo.TestBase; 11 12 import fr.mael.jiwigo.dao.CategoryDao; … … 22 23 public void ListerTest() { 23 24 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); 26 27 } catch (IOException e) { 27 28 e.printStackTrace(); … … 35 36 public void creerTest() { 36 37 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())); 38 39 } 39 40 -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java
r6963 r9385 5 5 import org.junit.Test; 6 6 7 import fr.mael.jiwigo.Main; 7 8 import fr.mael.jiwigo.TestBase; 8 9 import fr.mael.jiwigo.om.Category; … … 18 19 public void testCreer() throws Exception { 19 20 Category cat = null; 20 for (Category category : CategoryService.getInstance( ).lister(true)) {21 for (Category category : CategoryService.getInstance(Main.sessionManager).lister(true)) { 21 22 if (category.getIdentifiant().equals(3)) { 22 23 cat = category; … … 24 25 } 25 26 } 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()); 30 33 } 31 34 } -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java
r6964 r9385 8 8 import org.junit.Test; 9 9 10 import fr.mael.jiwigo.Main; 10 11 import fr.mael.jiwigo.TestBase; 11 12 import fr.mael.jiwigo.dao.TagDao; … … 23 24 public void ListerTest() { 24 25 try { 25 TagDao.getInstance( ).lister();26 TagDao.getInstance(Main.sessionManager).lister(); 26 27 } catch (IOException e) { 27 28 e.printStackTrace(); … … 36 37 Date date = new Date(); 37 38 try { 38 Assert.assertSame(true, TagService.getInstance( ).creer("Tag" + date.getTime()));39 Assert.assertSame(true, TagService.getInstance(Main.sessionManager).creer("Tag" + date.getTime())); 39 40 } catch (IOException e) { 40 41 // TODO Auto-generated catch block
Note: See TracChangeset
for help on using the changeset viewer.