Ignore:
Timestamp:
Apr 20, 2011, 5:17:02 AM (13 years ago)
Author:
anthony43
Message:

huge refactoring to introduce JiwigoException : a generic exception encapsulating low level exceptions (IOException, ProxyAuthentication, etc...)
The aim is to have, on the consumer side, just one exception to catch them all.
this refactoring may need a code review to check the changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo-ws-api/src/test/java/fr/mael/jiwigo/service/ServicesTest.java

    r10494 r10505  
    22
    33import java.io.File;
    4 import java.io.IOException;
    54import java.util.List;
    65
     
    1615import fr.mael.jiwigo.service.impl.CategoryServiceImpl;
    1716import fr.mael.jiwigo.service.impl.ImageServiceImpl;
     17import fr.mael.jiwigo.transverse.exception.JiwigoException;
    1818import fr.mael.jiwigo.transverse.session.SessionManager;
    1919import fr.mael.jiwigo.transverse.session.impl.SessionManagerImpl;
     
    2424
    2525    @Before
    26     public void setUp() {
     26    public void setUp() throws JiwigoException {
    2727        sessionManager = new SessionManagerImpl("mael", "motdepasse", "http://mael.piwigo.com", "Unit Test");
    2828        sessionManager.processLogin();
     
    7171        try {
    7272            imageService.addSimple(imageFile, categoryTest, title);
    73         } catch (IOException e) {
     73        } catch (JiwigoException e) {
    7474            Assert.fail("An exception was thrown while trying to send the pictures" + e.getMessage());
    7575        }
Note: See TracChangeset for help on using the changeset viewer.