Changeset 3300
- Timestamp:
- 08/08/13 08:08:26 (11 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/SourceDao.java
r3299 r3300 83 83 * @return the list of NewOrExistingSourceo objects in such a way that an element of the sourceInfoList is injected into an element of the return list 84 84 */ 85 85 //TODO: add non-existing sources!! now is implemented only for existing sources 86 86 public NewOrExistingSourceInfos contructNewOrExistingSourceInfo(List<SourceInfo> sourceInfoList); 87 87 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/TestBackendConstants.java
r3299 r3300 91 91 public static final String _TEST_VERSION_2_EXT_ID = "00000000-0000-0000-0000-000000000042"; 92 92 public static final String _TEST_VERSION_3_EXT_ID = "00000000-0000-0000-0000-000000000043"; 93 94 93 95 } 94 96 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/JdbcSourceDaoTest.java
r3299 r3300 200 200 assertEquals(TestBackendConstants._TEST_SOURCE_1_EXT_ID, result.get(0).getRef()); 201 201 assertEquals(TestBackendConstants._TEST_SOURCE_2_EXT_ID, result.get(1).getRef()); 202 assertEquals(TestBackendConstants._TEST_VERSION_1_EXT_ID, result.get(0).getVersion()); 203 assertEquals(TestBackendConstants._TEST_VERSION_3_EXT_ID, result.get(1).getVersion()); 204 assertEquals(TestBackendConstants._TEST_SOURCE_1_LINK, result.get(0).getLink()); 205 assertEquals(TestBackendConstants._TEST_SOURCE_2_LINK, result.get(1).getLink()); 202 206 203 207 } … … 207 211 */ 208 212 @Test 209 @Ignore210 213 public void testContructNewOrExistingSourceInfo() { 211 214 System.out.println("contructNewOrExistingSourceInfo"); 212 List<SourceInfo> sourceInfoList = null; 213 JdbcSourceDao instance = null; 214 NewOrExistingSourceInfos expResult = null; 215 NewOrExistingSourceInfos result = instance.contructNewOrExistingSourceInfo(sourceInfoList); 216 assertEquals(expResult, result); 217 // TODO review the generated test code and remove the default call to fail. 218 fail("The test case is a prototype."); 215 216 List<SourceInfo> sourceInfoList = new ArrayList<SourceInfo>(); 217 218 SourceInfo sourceInfoOne = new SourceInfo(); 219 sourceInfoOne.setLink(TestBackendConstants._TEST_SOURCE_1_LINK); 220 sourceInfoOne.setRef(TestBackendConstants._TEST_SOURCE_1_EXT_ID); 221 sourceInfoOne.setRef(TestBackendConstants._TEST_VERSION_1_EXT_ID); 222 223 SourceInfo sourceInfoTwo = new SourceInfo(); 224 sourceInfoTwo.setLink(TestBackendConstants._TEST_SOURCE_2_LINK); 225 sourceInfoTwo.setRef(TestBackendConstants._TEST_SOURCE_2_EXT_ID); 226 sourceInfoTwo.setRef(TestBackendConstants._TEST_VERSION_3_EXT_ID); 227 228 sourceInfoList.add(sourceInfoOne); 229 sourceInfoList.add(sourceInfoTwo); 230 231 NewOrExistingSourceInfos result = jdbcSourceDao.contructNewOrExistingSourceInfo(sourceInfoList); 232 assertEquals(2, result.getTarget().size()); 233 assertEquals(sourceInfoOne, result.getTarget().get(0).getSource()); 234 assertEquals(sourceInfoTwo, result.getTarget().get(1).getSource()); 235 219 236 } 220 237 } -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/resources/test-data/InsertTestData.sql
r3299 r3300 145 145 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (4, 4); 146 146 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (1, 5); 147 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (5, 5); 147 148 INSERT INTO versions_cached_representations (version_id, cached_representation_id) VALUES (6, 5); 148 149
Note: See TracChangeset
for help on using the changeset viewer.