Index: extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java
===================================================================
--- extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java	(revision 10089)
+++ extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java	(revision 10089)
@@ -0,0 +1,58 @@
+package fr.mael.jiwigo.service;
+
+import java.io.IOException;
+import java.util.Date;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import fr.mael.jiwigo.dao.impl.CategoryDaoImpl;
+import fr.mael.jiwigo.service.impl.CategoryServiceImpl;
+import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
+import fr.mael.jiwigo.transverse.session.SessionManager;
+import fr.mael.jiwigo.transverse.session.impl.SessionManagerImpl;
+
+public class CategoryServiceTest {
+	private SessionManager sessionManager;
+
+	@Before
+	public void setUp() {
+		sessionManager = new SessionManagerImpl("mael", "motdepasse", "http://mael.piwigo.com", "Unit Test");
+		sessionManager.processLogin();
+	}
+
+	/**
+	 * Test of the list method
+	 * 
+	 * @throws ProxyAuthenticationException
+	 */
+	@Test
+	public void ListerTest() throws ProxyAuthenticationException {
+		try {
+			CategoryDaoImpl categaryDao = new CategoryDaoImpl();
+			categaryDao.setSessionManager(sessionManager);
+			categaryDao.list(true);
+			categaryDao.list(false);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Test of the creation method
+	 * 
+	 * @throws ProxyAuthenticationException
+	 */
+	@Test
+	public void creerTest() throws ProxyAuthenticationException {
+		Date date = new Date();
+		CategoryServiceImpl categoryService = new CategoryServiceImpl();
+		CategoryDaoImpl dao = new CategoryDaoImpl();
+		dao.setSessionManager(sessionManager);
+		categoryService.setDao(dao);
+		Assert.assertSame(true, categoryService.create("Category" + date.getTime()));
+	}
+
+}
Index: extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/ServicesTest.java
===================================================================
--- extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/ServicesTest.java	(revision 10089)
+++ extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/ServicesTest.java	(revision 10089)
@@ -0,0 +1,51 @@
+package fr.mael.jiwigo.service;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import fr.mael.jiwigo.dao.impl.CategoryDaoImpl;
+import fr.mael.jiwigo.dao.impl.ImageDaoImpl;
+import fr.mael.jiwigo.om.Category;
+import fr.mael.jiwigo.om.Image;
+import fr.mael.jiwigo.service.impl.CategoryServiceImpl;
+import fr.mael.jiwigo.service.impl.ImageServiceImpl;
+import fr.mael.jiwigo.transverse.session.SessionManager;
+import fr.mael.jiwigo.transverse.session.impl.SessionManagerImpl;
+
+public class ServicesTest {
+
+	private SessionManager sessionManager;
+
+	@Before
+	public void setUp() {
+		sessionManager = new SessionManagerImpl("mael", "motdepasse", "http://mael.piwigo.com", "Unit Test");
+		sessionManager.processLogin();
+	}
+
+	@Test
+	public void testCreer() throws Exception {
+		Category cat = null;
+		CategoryServiceImpl categoryService = new CategoryServiceImpl();
+		CategoryDaoImpl categoryDao = new CategoryDaoImpl();
+		categoryDao.setSessionManager(sessionManager);
+		categoryService.setDao(categoryDao);
+
+		ImageServiceImpl imageService = new ImageServiceImpl();
+		ImageDaoImpl imageDao = new ImageDaoImpl();
+		imageDao.setSessionManager(sessionManager);
+		imageService.setDao(imageDao);
+
+		for (Category category : categoryService.list(true)) {
+			if (category.getIdentifier().equals(3)) {
+				cat = category;
+				break;
+			}
+		}
+		Image image = imageService.listByCategory(cat.getIdentifier(), true).get(0);
+		Assert.assertEquals("test de test do not delete", cat.getName());
+		Assert.assertEquals("20110329194915-0c0b3f36.jpg", image.getFile());
+
+	}
+}
Index: extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java
===================================================================
--- extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java	(revision 10089)
+++ extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java	(revision 10089)
@@ -0,0 +1,65 @@
+package fr.mael.jiwigo.service;
+
+import java.io.IOException;
+import java.util.Date;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import fr.mael.jiwigo.dao.impl.TagDaoImpl;
+import fr.mael.jiwigo.service.impl.TagServiceImpl;
+import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
+import fr.mael.jiwigo.transverse.session.SessionManager;
+import fr.mael.jiwigo.transverse.session.impl.SessionManagerImpl;
+
+public class TagServiceTest {
+
+	private SessionManager sessionManager;
+
+	@Before
+	public void setUp() {
+		sessionManager = new SessionManagerImpl("mael", "motdepasse", "http://mael.piwigo.com", "Unit Test");
+		sessionManager.processLogin();
+	}
+
+	/**
+	 * Test of the listing method
+	 * 
+	 * @throws ProxyAuthenticationException
+	 */
+	@Test
+	@Ignore
+	public void listTest() throws ProxyAuthenticationException {
+		try {
+			TagDaoImpl tagDao = new TagDaoImpl();
+			tagDao.setSessionManager(sessionManager);
+			// TODO something weird happens here,
+			// java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeepNodeListImpl cannot be cast to
+			// org.w3c.dom.Element
+			// at fr.mael.jiwigo.dao.impl.TagDaoImpl.list(TagDaoImpl.java:58)
+			tagDao.list();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Test of the creation method
+	 * 
+	 * @throws ProxyAuthenticationException
+	 * @throws IOException
+	 */
+	@Test
+	public void createTest() throws ProxyAuthenticationException, IOException {
+		Date date = new Date();
+		TagServiceImpl tagService = new TagServiceImpl();
+		TagDaoImpl tagDao = new TagDaoImpl();
+		tagDao.setSessionManager(sessionManager);
+		tagService.setDao(tagDao);
+		Assert.assertSame(true, tagService.create("Tag" + date.getTime()));
+	}
+
+}
