- Timestamp:
- Feb 26, 2011, 5:26:27 PM (13 years ago)
- Location:
- extensions/jiwigo/trunk
- Files:
-
- 2 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/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 }
Note: See TracChangeset
for help on using the changeset viewer.