root / db / create_test_data.sql

Revision 242:f3edbef4ecfc, 1.6 kB (checked in by Harri Kaimio <harri@…>, 6 years ago)

Fixed unit tests to work with Derby dabatabase - currently one that resides in c:\temp\hashtest

modified conf/junittest_config.xml
Fixed DB definitions
modified db/create_test_data.sql
Changed to use ' instead of ", included column banes in INSERT clauses

modified src/main/java/org/photovault/common/JUnitOJBManager.java
Get SQL connection via PB

modified src/main/java/org/photovault/dbhelper/ImageDb.java
modified src/main/java/org/photovault/folder/Test_PhotoFolder.java
modified src/main/java/org/photovault/imginfo/Test_ImageInstance.java
modified src/main/java/org/photovault/imginfo/Test_Volume.java
FIxes to make Derby work

Line 
1---
2-- Create folders for PhtoFolder test
3---
4 
5delete from photo_collections;
6insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified) values (1, null, 'Top', '', NULL, null);
7insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 100, 1, 'subfolderTest', '', NULL, null);
8insert into photo_collections  (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 101, 100, 'Subfolder1', '', NULL, null);
9insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 102, 100, 'Subfolder2', '', NULL, null);
10insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 103, 100, 'Subfolder3', '', NULL, null);
11insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 104, 100, 'Subfolder4', '', NULL, null);
12insert into photo_collections (collection_id, parent, collection_name, collection_desc, create_time, last_modified)  values ( 105, 1, 'testPhotoRetrieval', '', NULL, null);
13
14delete from photos;
15insert into photos(photo_id, description) values( 1, 'testPhoto1' );
16insert into photos(photo_id, description) values( 2, 'testPhotoRetrieval1' );
17insert into photos(photo_id, description) values( 3, 'testPhotoRetrieval2' );
18
19delete from collection_photos;
20insert into collection_photos (collection_id, photo_id) values( 105, 2 );
21insert into collection_photos (collection_id, photo_id) values( 105, 3 );
Note: See TracBrowser for help on using the browser.