source: DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/TestBackendConstants.java @ 3380

Last change on this file since 3380 was 3380, checked in by olhsha, 11 years ago

"put updated body" is implemented and tested. Big refactring: simplifying DAO's and pushing their composition to rest methods. add-methods in DAO return now not the classes but internalID-s of the added resources. Still 2 test errors and 2 test failures.

File size: 5.9 KB
Line 
1/**
2 * Copyright (C) 2013 DASISH
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18/*
19 * To change this template, choose Tools | Templates
20 * and open the template in the editor.
21 */
22
23package eu.dasish.annotation.backend;
24
25public class TestBackendConstants {
26   
27    public static final String _TEST_UID_1_ = "00000000-0000-0000-0000-000000000003";
28    public static final String _TEST_UID_2_ = "00000000-0000-0000-0000-000000000004";
29    public static final String _TEST_AID_1_ =  "00000000-0000-0000-0000-000000000005"; 
30    public static final String _TEST_NULL_UUID_ = "00000000-0000-0000-0000-000000000006";
31   
32    // testing jdbcAnnotationDao
33    public static final String _TEST_NOTEBOOK_3_EXT = "00000000-0000-0000-0000-000000000011";
34    public static final String _TEST_NOTEBOOK_4_EXT = "00000000-0000-0000-0000-000000000012";
35    public static final String _TEST_NOTEBOOK_5_EXT = "00000000-0000-0000-0000-000000000013";
36   
37    public static final String _TEST_NOTEBOOK_3_TITLE = "Notebook 3";
38    public static final String _TEST_NOTEBOOK_4_TITLE = "Notebook 4";
39    public static final String _TEST_NOTEBOOK_5_TITLE = "Notebook 5";
40   
41    public static final String _TEST_ANNOT_2_EXT = "00000000-0000-0000-0000-000000000021";
42    public static final String _TEST_ANNOT_3_EXT = "00000000-0000-0000-0000-000000000022";
43    public static final String _TEST_ANNOT_4_EXT = "00000000-0000-0000-0000-000000000023";
44    public static final String _TEST_ANNOT_5_EXT  = "00000000-0000-0000-0000-000000000024";
45    public static final String _TEST_ANNOT_7_EXT_NOT_IN_DB = "00000000-0000-0000-0000-000000000026";
46   
47    public static final String _TEST_ANNOT_2_HEADLINE = "Sagrada Famiglia";
48    public static final String _TEST_ANNOT_3_HEADLINE = "Gaudi";
49    public static final String _TEST_ANNOT_4_HEADLINE = "Art Nuveau";
50    public static final String _TEST_ANNOT_TO_ADD_HEADLINE = "Annotation to add to test DAO";
51   
52    public static final int _TEST_ANNOT_2_OWNER = 3;
53    public static final int _TEST_ANNOT_3_OWNER = 4;
54    public static final int _TEST_ANNOT_4_OWNER = 5;
55   
56    public static final String _TEST_ANNOT_2_BODY = "<html><body>some html 1</body></html>";
57    public static final String _TEST_ANNOT_TO_ADD_BODY = "<html><body>the stuff to be added</body></html>";
58   
59    public static final String _TEST_ANNOT_2_TIME_STAMP = "2013-08-12T11:25:00.383+02:00";
60   
61    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');";
62   
63    public static final String _TEST_USER_3_EXT_ID = "00000000-0000-0000-0000-000000000111";
64    public static final String _TEST_USER_4_EXT_ID = "00000000-0000-0000-0000-000000000112"; 
65    public static final String _TEST_USER_5_EXT_ID = "00000000-0000-0000-0000-000000000113"; 
66   
67    public static final String _TEST_USER_XXX_EXT_ID = "00000000-0000-0000-0000-000000000666"; 
68   
69 ////////////////////////////////////////////////////////////////////////////////////////////////////////////   
70   
71//    INSERT 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); -- 1
72//    INSERT 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); --2
73
74   
75    public static final String _TEST_SOURCE_1_EXT_ID = "00000000-0000-0000-0000-000000000031";
76    public static final String _TEST_SOURCE_2_EXT_ID = "00000000-0000-0000-0000-000000000032";
77   
78    public static final String _TEST_SOURCE_1_LINK = "http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia";
79    public static final String _TEST_SOURCE_2_LINK = "http://nl.wikipedia.org/wiki/Antoni_Gaud%C3%AD";
80   
81    public static final int _TEST_SOURCE_1_VERSION_ID = 1;
82    public static final int _TEST_SOURCE_2_VERSION_ID = 3;
83   
84    public static final String _TEST_CACHED_REPRESENTATION_1_EXT_ID_ = "00000000-0000-0000-0000-000000000051";
85    // INSERT INTO cached_representation_info (external_id, mime_type, tool, type_, where_is_the_file) VALUES ('00000000-0000-0000-0000-000000000051', 'text/html', 'latex', 'text', 'corpus1'); --1
86    public static final String _TEST_CACHED_REPRESENTATION_1_MIME_TYPE_ =  "text/html";
87    public static final String _TEST_CACHED_REPRESENTATION_1_TOOL_ =  "latex";
88    public static final String _TEST_CACHED_REPRESENTATION_1_TYPE_ =  "text";
89   
90    public static final String _TEST_VERSION_1_EXT_ID = "00000000-0000-0000-0000-000000000041";
91    public static final String _TEST_VERSION_2_EXT_ID = "00000000-0000-0000-0000-000000000042";
92    public static final String _TEST_VERSION_3_EXT_ID = "00000000-0000-0000-0000-000000000043";
93    public static final String _TEST_VERSION_NONEXIST_EXT_ID = "00000000-0000-0000-0000-000000000049";
94   
95    public static final String _TEST_TEMP_SOURCE_ID = "Barcelona-1";
96    public static final String _TEST_ANNOT_TO_ADD_NEW_SOURCE_BODY = "refers to "+_TEST_TEMP_SOURCE_ID;
97    public static final String _TEST_ANNOT_TO_ADD_NEW_SOURCE_HEADLINE = "SF in Catalan";
98    public static final String _TEST_NEW_SOURCE_LINK = "http://www.sagradafamilia.cat/docs_instit/historia.php ";
99}
100
Note: See TracBrowser for help on using the repository browser.