Changeset 4886 for DASISH


Ignore:
Timestamp:
04/02/14 21:15:22 (10 years ago)
Author:
olhsha@mpi.nl
Message:

updated unit test annotation dao works fully, as a standalone class and inside the whole test

Location:
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDao.java

    r4885 r4886  
    393393
    394394        String[] body = retrieveBodyComponents(annotation.getBody());
    395         //debug
    396         System.out.println(annotation.getURI());
     395       
    397396        String externalID = this.stringURItoExternalID(annotation.getURI());
    398397        Map<String, Object> params = new HashMap<String, Object>();
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcResourceDao.java

    r4885 r4886  
    276276        // debug
    277277        System.out.println("test Input stringURItoExternalID : "+stringURI);
     278        System.out.println("test serviceUri : "+_serviceURI);
    278279        if (stringURI.length() > _serviceURI.length()) {
    279280            return stringURI.substring(_serviceURI.length());
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDaoTest.java

    r4885 r4886  
    495495
    496496    @Test
    497     @Ignore
    498497    public void testUpdateAnnotation() {
    499         System.out.println("KOUKOUK!!!!");
    500 
     498        System.out.println("test UpdateAnnotation");
     499        jdbcAnnotationDao.setServiceURI(TestBackendConstants._TEST_SERVLET_URI_annotations);
     500       
    501501        Annotation annotation = testInstances.getAnnotationOne();
    502502        annotation.setHeadline("updated headline 1");
     
    507507        int result = jdbcAnnotationDao.updateAnnotation(annotation,1, 1);
    508508        assertEquals(1, result);
    509 //        Annotation check = jdbcAnnotationDao.getAnnotationWithoutTargetsAndPemissions(1);
    510 //        assertEquals("updated some html 1", check.getBody().getTextBody().getBody());
    511 //        assertEquals("text/plain", check.getBody().getTextBody().getMimeType());
    512 //        assertEquals("updated headline 1", check.getHeadline());
     509        System.out.println(" annotation updated");
     510        Annotation check = jdbcAnnotationDao.getAnnotationWithoutTargetsAndPemissions(1);
     511        assertEquals("updated some html 1", check.getBody().getTextBody().getBody());
     512        assertEquals("text/plain", check.getBody().getTextBody().getMimeType());
     513        assertEquals("updated headline 1", check.getHeadline());
    513514
    514515    }
Note: See TracChangeset for help on using the changeset viewer.