diff options
author | Michael Kinney <michaelakinney@comcast.net> | 2021-01-28 14:58:53 -0500 |
---|---|---|
committer | Michael Kinney <michaelakinney@comcast.net> | 2021-01-28 14:58:53 -0500 |
commit | 19e4d9fd1da48f55946e57529ce03f8fa880ed2d (patch) | |
tree | 8d3dae82c2ce7737447f25da7a7576d8cbb55246 | |
parent | 0d13f0ed622b7418b703d591e1878a4ba77f694c (diff) | |
download | sdl_ios-19e4d9fd1da48f55946e57529ce03f8fa880ed2d.tar.gz |
update SDLIAPSession unit tests
-rw-r--r-- | SmartDeviceLinkTests/TransportSpecs/iAP/SDLIAPSessionSpec.m | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/SmartDeviceLinkTests/TransportSpecs/iAP/SDLIAPSessionSpec.m b/SmartDeviceLinkTests/TransportSpecs/iAP/SDLIAPSessionSpec.m index 8b638afb0..8e6f119ed 100644 --- a/SmartDeviceLinkTests/TransportSpecs/iAP/SDLIAPSessionSpec.m +++ b/SmartDeviceLinkTests/TransportSpecs/iAP/SDLIAPSessionSpec.m @@ -10,34 +10,30 @@ #import <Nimble/Nimble.h> #import <OCMock/OCMock.h> -#import "EAAccessory+OCMock.h" +#import "EAAccessory+OCMock.m" #import "SDLIAPSession.h" #import "SDLIAPConstants.h" - QuickSpecBegin(SDLIAPSessionSpec) describe(@"SDLIAPSession", ^{ __block EAAccessory *mockAccessory = nil; + __block id<SDLIAPSessionDelegate> mockDelegate = nil; describe(@"Initialization", ^{ __block SDLIAPSession *testSession = nil; beforeEach(^{ mockAccessory = [EAAccessory.class sdlCoreMock]; - testSession = [[SDLIAPSession alloc] initWithAccessory:mockAccessory forProtocol:ControlProtocolString]; + mockDelegate = OCMProtocolMock(@protocol(SDLIAPSessionDelegate)); + testSession = [[SDLIAPSession alloc] initWithAccessory:mockAccessory forProtocol:ControlProtocolString iAPSessionDelegate:mockDelegate]; }); it(@"should init correctly", ^{ expect(testSession.accessory).to(equal(mockAccessory)); expect(testSession.protocolString).to(equal(ControlProtocolString)); - expect(testSession.isInputStreamOpen).to(beFalse()); - expect(testSession.isOutputStreamOpen).to(beFalse()); - }); - - it(@"should get correctly", ^{ - expect(testSession.isStopped).to(beTrue()); - expect(testSession.connectionID).to(equal(0)); + expect(testSession.bothStreamsOpen).to(beFalse()); + expect(testSession.hasSpaceAvailable).to(beFalse()); expect(testSession.isSessionInProgress).to(beFalse()); }); }); @@ -45,3 +41,4 @@ describe(@"SDLIAPSession", ^{ QuickSpecEnd + |