diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-08-11 16:45:35 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-08-11 16:45:35 -0400 |
commit | 4359fdf9fed81bec72fcecd9f9b26cfa368d0699 (patch) | |
tree | 2c1f432d340e92d0de7723c5da217ed0a5364678 /SmartDeviceLinkTests | |
parent | e047c18fd1702025d8a13406c570dfe82b48b22a (diff) | |
download | sdl_ios-4359fdf9fed81bec72fcecd9f9b26cfa368d0699.tar.gz |
SDLFile now holds data in RAM if initialized that way
* Get rid of more TODOs
* SDLLockScreenManager now holds a strong reference to the lock screen configuration because the object could be large
* The lifecycle manager can now fail to start if managers fail to start and will unregister
* Removed an orphaned method from SDLFileManager
* Add some documentation
* Fix test failures caused by previous changes
Diffstat (limited to 'SmartDeviceLinkTests')
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m | 8 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLFileSpec.m | 6 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m | 10 |
3 files changed, 20 insertions, 4 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m index b7673ad35..0c720e4cb 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m @@ -15,7 +15,13 @@ #import "SDLRPCResponse.h" #import "TestConnectionManager.h" -// Not ideal, create a private backing _SDLFileManager class with more exposed for testing purposes and use SDLFileManager as the public facade? + +typedef NSString SDLFileManagerState; +SDLFileManagerState *const SDLFileManagerStateShutdown = @"Shutdown"; +SDLFileManagerState *const SDLFileManagerStateFetchingInitialList = @"FetchingInitialList"; +SDLFileManagerState *const SDLFileManagerStateReady = @"Ready"; + + @interface SDLFileManager () @property (strong, nonatomic) NSOperationQueue *transactionQueue; diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileSpec.m index 86354589a..b5c41e6c9 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileSpec.m @@ -26,9 +26,9 @@ describe(@"SDLFile", ^{ testFile = [[SDLFile alloc] initWithData:testData name:testName fileExtension:testFileType persistent:testPersistence]; }); - it(@"should store the data in a temp file", ^{ - expect(testFile.fileURL).toNot(beNil()); - expect(@([[NSFileManager defaultManager] fileExistsAtPath:testFile.fileURL.path])).to(equal(@YES)); + it(@"should not store the data in a temp file", ^{ + expect(testFile.fileURL).to(beNil()); + expect(@([[NSFileManager defaultManager] fileExistsAtPath:testFile.fileURL.path])).to(beFalsy()); }); it(@"should correctly store data", ^{ diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m index 236d5c50f..c9861de49 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m @@ -29,6 +29,16 @@ #import "SDLUnregisterAppInterfaceResponse.h" +typedef NSString SDLLifecycleState; +SDLLifecycleState *const SDLLifecycleStateDisconnected = @"TransportDisconnected"; +SDLLifecycleState *const SDLLifecycleStateTransportConnected = @"TransportConnected"; +SDLLifecycleState *const SDLLifecycleStateRegistered = @"Registered"; +SDLLifecycleState *const SDLLifecycleStateSettingUpManagers = @"SettingUpManagers"; +SDLLifecycleState *const SDLLifecycleStatePostManagerProcessing = @"PostManagerProcessing"; +SDLLifecycleState *const SDLLifecycleStateUnregistering = @"Unregistering"; +SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; + + // Ignore the deprecated proxy methods #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" |