Changeset 3210


Ignore:
Timestamp:
07/30/13 13:26:40 (11 years ago)
Author:
olhsha
Message:

adding test for one (so far, single) user-do-method and extending the test DB

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

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/web.xml

    r3180 r3210  
    2626        <param-value>classpath*:spring-config/**/*.xml</param-value>
    2727    </context-param>
    28  
    2928    <listener>
    3029        <listener-class>
     
    3231        </listener-class>
    3332    </listener>
    34  
    3533    <servlet>
    3634        <servlet-name>annotator-backend</servlet-name>
     
    4644        <load-on-startup>1</load-on-startup>
    4745    </servlet>
    48    
    4946    <servlet>
    5047        <servlet-name>ServletAdaptor</servlet-name>
     
    5653        <url-pattern>/api/*</url-pattern>
    5754    </servlet-mapping>
    58    
    59    
    60    
    61 <!--    <servlet-mapping>
     55    <!--    <servlet-mapping>
    6256        <servlet-name>ServletAdaptor</servlet-name>
    6357        <url-pattern>/webresources/*</url-pattern>
    6458    </servlet-mapping>-->
    65    
    66    
    67     </web-app>
     59    <servlet-mapping>
     60        <servlet-name>ServletAdaptor</servlet-name>
     61        <url-pattern>/webresources/*</url-pattern>
     62    </servlet-mapping>
     63</web-app>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/TestBackendConstants.java

    r3206 r3210  
    7373    public static final String annotaiontoDeleteInDB="INSERT INTO annotation (annotation_id, owner_id,headline,body_xml, external_id) VALUES (25, 111, 'Annotation to delete','<html><body>some html 4</body></html>', '00000000-0000-0000-0000-000000000025');";
    7474   
    75     public static final String _TEST_OWNER_3_EXT_ID = "00000000-0000-0000-0000-000000000111";
     75    public static final String _TEST_USER_3_EXT_ID = "00000000-0000-0000-0000-000000000111";
    7676    public static final String _TEST_OWNER_4_EXT_ID = "00000000-0000-0000-0000-000000000112"; 
    7777    public static final String _TEST_OWNER_5_EXT_ID = "00000000-0000-0000-0000-000000000113"; 
    7878   
     79    public static final String _TEST_USER_XXX_EXT_ID = "00000000-0000-0000-0000-000000000666"; 
    7980}
    8081
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/resources/test-data/InsertTestData.sql

    r3206 r3210  
    5454
    5555
     56-- CREATE TABLE version (
     57--     version_id SERIAL UNIQUE NOT NULL,
     58--     external_id UUID UNIQUE NOT NULL,
     59--     version text,
     60--     --  SOUNDNESS: there must be at least one row with this version_id in the verions_cached_representations table
     61-- );
     62
     63INSERT INTO version (external_id, version) VALUES ('00000000-0000-0000-0000-000000000041', 'SF-version 2013'); -- 1
     64INSERT INTO version (external_id, version) VALUES ('00000000-0000-0000-0000-000000000042', 'SF-version 2012'); -- 2
     65INSERT INTO version (external_id, version) VALUES ('00000000-0000-0000-0000-000000000043', 'Gaudi wiki -version 2013'); -- 3
     66INSERT INTO version (external_id, version) VALUES ('00000000-0000-0000-0000-000000000044', 'Art Nuveau wiki -version 2013'); --4
     67
     68-- CREATE TABLE target_source (
     69--     source_id SERIAL UNIQUE NOT NULL,
     70--   external_id UUID UNIQUE NOT NULL,
     71--     time_stamp timestamp with time zone default now(),
     72--     link_uri text,
     73--     version_id integer REFERENCES version(version_id), ---- DIFFERS from the xml structure,
     74--     -- SOUNDNESS: there must be exactly version at the version table  ++   
     75--     -- soundness: there must be at least one annotation referring to this source
     76-- );
     77
     78
     79INSERT INTO target_source (external_id, link_uri, version_id) VALUES ('00000000-0000-0000-0000-000000000031', 'http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia', 1);
     80INSERT INTO target_source (external_id, link_uri, version_id) VALUES ('00000000-0000-0000-0000-000000000032', 'http://nl.wikipedia.org/wiki/Antoni_Gaud%C3%AD', 3);
     81INSERT INTO target_source (external_id, link_uri, version_id) VALUES ('00000000-0000-0000-0000-000000000033', 'http://en.wikipedia.org/wiki/Art_Nouveau', 4);
     82
Note: See TracChangeset for help on using the changeset viewer.