Changeset 833

Show
Ignore:
Timestamp:
04/28/2009 11:05:08 PM (3 years ago)
Author:
gbooker
Message:

Tests to find issues with cascading delete

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/main_debug.m

    r801 r833  
    112112         
    113113//      overrideApplicationSupportdir([NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Frontrow"]); 
    114 //#define TESTING_UPGRADE 
     114#define TESTING_UPGRADE 
    115115#ifdef TESTING_UPGRADE 
    116116        { 
     
    126126                return 0; 
    127127         
    128         NSManagedObjectContext *moc = [SapphireApplianceController newManagedObjectContextForFile:storeFile options:nil]; 
     128        NSManagedObjectContext *moc = [SapphireApplianceController newManagedObjectContextForFile:storeFile]; 
     129        [SapphireMetaDataSupport setMainContext:moc]; 
    129130         
    130131        //Debug code goes here: 
     
    173174        } 
    174175#endif 
    175 #define TESTING_UPDATED_VALUES 
     176//#define TESTING_UPDATED_VALUES 
    176177#ifdef TESTING_UPDATED_VALUES 
    177178        { 
     
    197198        } 
    198199#endif 
     200#define TESTING_DIRECTORY_RESCAN 
     201#ifdef TESTING_DIRECTORY_RESCAN 
     202        { 
     203                SapphireMovie *movie = [SapphireMovie movieWithTitle:@"Little Eistiens: Our Big Huge Adventure" inContext:moc]; 
     204                SapphireFileMetaData *file = [SapphireFileMetaData fileWithPath:@"/Users/gbooker/Movies/Little Einsteins.avi" inContext:moc]; 
     205                [moc deleteObject:file]; 
     206                [moc processPendingChanges]; 
     207                SapphireDirectoryMetaData *dir = [SapphireDirectoryMetaData directoryWithPath:@"/Users/gbooker/Movies" inContext:moc]; 
     208                [dir reloadDirectoryContents]; 
     209        } 
     210#endif 
    199211         
    200212        [pool release];