diff options
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m | 6 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m | 15 |
2 files changed, 10 insertions, 11 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m index 8e4df67a6..f47748e0b 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m @@ -48,8 +48,8 @@ describe(@"menu manager", ^{ __block SDLArtwork *testArtwork = [[SDLArtwork alloc] initWithData:[@"Test data" dataUsingEncoding:NSUTF8StringEncoding] name:@"some artwork name" fileExtension:@"png" persistent:NO]; - __block SDLMenuCell *textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" icon:nil voiceCommands:nil handler:^{}]; - __block SDLMenuCell *textAndImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 2" icon:testArtwork voiceCommands:nil handler:^{}]; + __block SDLMenuCell *textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + __block SDLMenuCell *textAndImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 2" icon:testArtwork voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; __block SDLMenuCell *submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Test 3" subCells:@[textOnlyCell, textAndImageCell]]; beforeEach(^{ @@ -67,7 +67,7 @@ describe(@"menu manager", ^{ expect(testManager.inProgressUpdate).to(beNil()); expect(testManager.hasQueuedUpdate).to(beFalse()); expect(testManager.waitingOnHMIUpdate).to(beFalse()); - expect(testManager.lastMenuId).to(equal(0)); + expect(testManager.lastMenuId).to(equal(1)); expect(testManager.oldMenuCells).to(beEmpty()); }); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m index 305387d8d..7b7c77799 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m @@ -19,13 +19,12 @@ @interface SDLVoiceCommandManager() @property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager; -@property (weak, nonatomic) SDLFileManager *fileManager; -@property (copy, nonatomic, nullable) SDLHMILevel currentLevel; +@property (assign, nonatomic) BOOL waitingOnHMIUpdate; +@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel; @property (strong, nonatomic, nullable) NSArray<SDLRPCRequest *> *inProgressUpdate; @property (assign, nonatomic) BOOL hasQueuedUpdate; -@property (assign, nonatomic) BOOL waitingOnHMILevelUpdate; @property (assign, nonatomic) UInt32 lastVoiceCommandId; @property (copy, nonatomic) NSArray<SDLVoiceCommand *> *oldVoiceCommands; @@ -51,10 +50,10 @@ describe(@"voice command manager", ^{ it(@"should instantiate correctly", ^{ expect(testManager.voiceCommands).to(beEmpty()); expect(testManager.connectionManager).to(equal(mockConnectionManager)); - expect(testManager.currentLevel).to(beNil()); + expect(testManager.currentHMILevel).to(beNil()); expect(testManager.inProgressUpdate).to(beNil()); expect(testManager.hasQueuedUpdate).to(beFalse()); - expect(testManager.waitingOnHMILevelUpdate).to(beFalse()); + expect(testManager.waitingOnHMIUpdate).to(beFalse()); expect(testManager.lastVoiceCommandId).to(equal(VoiceCommandIdMin)); expect(testManager.oldVoiceCommands).to(beEmpty()); }); @@ -62,7 +61,7 @@ describe(@"voice command manager", ^{ describe(@"updating voice commands before HMI is ready", ^{ context(@"when in HMI NONE", ^{ beforeEach(^{ - testManager.currentLevel = SDLHMILevelNone; + testManager.currentHMILevel = SDLHMILevelNone; }); it(@"should not update", ^{ @@ -73,7 +72,7 @@ describe(@"voice command manager", ^{ context(@"when no HMI level has been received", ^{ beforeEach(^{ - testManager.currentLevel = nil; + testManager.currentHMILevel = nil; }); it(@"should not update", ^{ @@ -85,7 +84,7 @@ describe(@"voice command manager", ^{ describe(@"updating voice commands", ^{ beforeEach(^{ - testManager.currentLevel = SDLHMILevelFull; + testManager.currentHMILevel = SDLHMILevelFull; }); it(@"should properly update a command", ^{ |