summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-03-21 13:05:27 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-03-21 13:05:27 -0400
commit7abec8be16ea5fcfcc5cd749ad7047f911b7085d (patch)
treeb03796f86eed3fd0709ae3598975a0c980ad859f
parent54d0f394ad758258d7799c6795f7c2f59cb73f3d (diff)
downloadsdl_ios-7abec8be16ea5fcfcc5cd749ad7047f911b7085d.tar.gz
Fix unit tests
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m15
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceDataSpec.m12
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceManifestSpec.m14
3 files changed, 5 insertions, 36 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
index fcc89caea..bc0513c9e 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
@@ -49,13 +49,6 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.subscribe).to(beTrue());
});
- it(@"Should initialize correctly with initWithServiceType:", ^{
- SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initWithServiceType:testServiceType];
-
- expect(testRequest.serviceType).to(equal(testServiceType));
- expect(testRequest.subscribe).to(beNil());
- });
-
it(@"Should initialize correctly with initWithAppServiceType:", ^{
SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initWithAppServiceType:testAppServiceType];
@@ -70,11 +63,11 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.subscribe).to(beTrue());
});
- it(@"Should initialize correctly with initWithServiceType:subscribe:", ^{
- SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initWithServiceType:testServiceType subscribe:testSubscribe];
+ fit(@"Should initialize correctly with initAndUnsubscribeToAppServiceType:", ^{
+ SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initAndUnsubscribeToAppServiceType:testAppServiceType];
- expect(testRequest.serviceType).to(equal(testServiceType));
- expect(testRequest.subscribe).to(beTrue());
+ expect(testRequest.serviceType).to(equal(testAppServiceType));
+ expect(testRequest.subscribe).to(beFalse());
});
it(@"Should return nil if not set", ^{
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceDataSpec.m
index 3e94c5def..ec1aef4ab 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceDataSpec.m
@@ -66,16 +66,6 @@ describe(@"Getter/Setter Tests", ^{
expect(testStruct.navigationServiceData).to(equal(testNavigationServiceData));
});
- it(@"Should get correctly when initialized with initWithServiceType:serviceId:", ^{
- SDLAppServiceData *testStruct = [[SDLAppServiceData alloc] initWithServiceType:testServiceType serviceId:testServiceId];
-
- expect(testStruct.serviceType).to(equal(testServiceType));
- expect(testStruct.serviceId).to(equal(testServiceId));
- expect(testStruct.mediaServiceData).to(beNil());
- expect(testStruct.weatherServiceData).to(beNil());
- expect(testStruct.navigationServiceData).to(beNil());
- });
-
it(@"Should get correctly when initialized with initWithAppServiceType:serviceId:", ^{
SDLAppServiceData *testStruct = [[SDLAppServiceData alloc] initWithAppServiceType:testAppServiceType serviceId:testServiceId];
@@ -117,7 +107,7 @@ describe(@"Getter/Setter Tests", ^{
});
it(@"Should get correctly when initialized with initWithServiceType:serviceId:mediaServiceData:weatherServiceData:navigationServiceData:", ^{
- SDLAppServiceData *testStruct = [[SDLAppServiceData alloc] initWithServiceType:testServiceType serviceId:testServiceId mediaServiceData:testMediaServiceData weatherServiceData:testWeatherServiceData navigationServiceData:testNavigationServiceData];
+ SDLAppServiceData *testStruct = [[SDLAppServiceData alloc] initWithAppServiceType:testServiceType serviceId:testServiceId mediaServiceData:testMediaServiceData weatherServiceData:testWeatherServiceData navigationServiceData:testNavigationServiceData];
expect(testStruct.serviceType).to(equal(testServiceType));
expect(testStruct.serviceId).to(equal(testServiceId));
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceManifestSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceManifestSpec.m
index 3b3467c3a..b12c8e8ad 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceManifestSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAppServiceManifestSpec.m
@@ -94,20 +94,6 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.navigationServiceManifest).to(equal(testNavigationServiceManifest));
});
- it(@"Should init correctly with initWithServiceType:", ^{
- SDLAppServiceManifest *testStruct = [[SDLAppServiceManifest alloc] initWithServiceType:testServiceType];
-
- expect(testStruct.serviceName).to(beNil());
- expect(testStruct.serviceType).to(equal(testServiceType));
- expect(testStruct.serviceIcon).to(beNil());
- expect(testStruct.allowAppConsumers).to(beNil());
- expect(testStruct.rpcSpecVersion).to(beNil());
- expect(testStruct.handledRPCs).to(beNil());
- expect(testStruct.weatherServiceManifest).to(beNil());
- expect(testStruct.mediaServiceManifest).to(beNil());
- expect(testStruct.navigationServiceManifest).to(beNil());
- });
-
it(@"Should init correctly with initWithAppServiceType:", ^{
SDLAppServiceManifest *testStruct = [[SDLAppServiceManifest alloc] initWithAppServiceType:testAppServiceType];