diff options
author | NicoleYarroch <nicole@livio.io> | 2020-06-05 11:26:29 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2020-06-05 11:26:29 -0400 |
commit | 54b9ab0993956c068722140f295f22841f7e96a9 (patch) | |
tree | ad8fe2d0bc78447cf7b25c15cb40f863c35edcb4 | |
parent | 36373153b0a3ca6a06f5a1d20c0ee2a2298016c5 (diff) | |
download | sdl_ios-54b9ab0993956c068722140f295f22841f7e96a9.tar.gz |
Removed thread sleeping
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m index e3b980780..8fb5caec7 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m @@ -72,8 +72,6 @@ describe(@"the streaming video manager", ^{ hmiStatus.videoStreamingState = streamState; SDLRPCNotificationNotification *notification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeHMIStatusNotification object:self rpcNotification:hmiStatus]; [[NSNotificationCenter defaultCenter] postNotification:notification]; - - [NSThread sleepForTimeInterval:0.3]; }; beforeEach(^{ @@ -183,12 +181,11 @@ describe(@"the streaming video manager", ^{ SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:someRegisterAppInterfaceResponse]; [[NSNotificationCenter defaultCenter] postNotification:notification]; - [NSThread sleepForTimeInterval:0.1]; }); it(@"should save the connected vehicle make but not the screen size", ^{ - expect(@(CGSizeEqualToSize(streamingLifecycleManager.videoScaleManager.displayViewportResolution, CGSizeZero))).to(equal(@YES)); - expect(streamingLifecycleManager.connectedVehicleMake).to(equal(testVehicleType.make)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.videoScaleManager.displayViewportResolution, CGSizeZero))).toEventually(equal(@YES)); + expect(streamingLifecycleManager.connectedVehicleMake).toEventually(equal(testVehicleType.make)); }); }); @@ -213,11 +210,10 @@ describe(@"the streaming video manager", ^{ SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:someRegisterAppInterfaceResponse]; [[NSNotificationCenter defaultCenter] postNotification:notification]; - [NSThread sleepForTimeInterval:0.1]; }); it(@"should save the connected vehicle make and the screen size", ^{ - expect(@(CGSizeEqualToSize(streamingLifecycleManager.videoScaleManager.displayViewportResolution, CGSizeMake(600, 100)))).to(equal(@YES)); + expect(@(CGSizeEqualToSize(streamingLifecycleManager.videoScaleManager.displayViewportResolution, CGSizeMake(600, 100)))).toEventually(equal(@YES)); expect(streamingLifecycleManager.connectedVehicleMake).toEventually(equal(testVehicleType.make)); }); }); @@ -250,7 +246,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -260,7 +256,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -270,7 +266,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateReady)); }); }); @@ -280,7 +276,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateReady)); }); }); @@ -290,7 +286,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); }); @@ -319,7 +315,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the streams", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -329,7 +325,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -339,7 +335,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateReady)); }); }); @@ -349,7 +345,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateReady)); }); }); @@ -359,7 +355,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -370,7 +366,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); @@ -381,7 +377,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should close the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateShuttingDown)); }); }); }); @@ -403,7 +399,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not start the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStopped)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateStopped)); }); }); @@ -413,7 +409,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not start the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStopped)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateStopped)); }); }); @@ -423,7 +419,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should start the streams", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStarting)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateStarting)); }); }); @@ -433,7 +429,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should start the streams", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStarting)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateStarting)); }); }); @@ -443,7 +439,7 @@ describe(@"the streaming video manager", ^{ }); it(@"should not start the stream", ^{ - expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStopped)); + expect(streamingLifecycleManager.currentVideoStreamState).toEventually(equal(SDLVideoStreamManagerStateStopped)); }); }); }); |