summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2021-02-25 16:26:32 -0500
committerJoel Fischer <joeljfischer@gmail.com>2021-02-25 16:26:32 -0500
commit90f41bc2be9af323074b037535edfa19410470e7 (patch)
tree51af5d474588833d0f50df151a6982e253c5674e
parent54cb8a68010abd244b8251f9dcfb1c8f326610c0 (diff)
downloadsdl_ios-feature/issue-1876-sdl-0293-enable-oem-exclusive-app-support.tar.gz
* Add SDLVehicleTypeSpec test for new init * Fix typo
-rw-r--r--Example Apps/Example ObjC/ProxyManager.m3
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift2
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj19
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVehicleTypeSpec.m58
4 files changed, 41 insertions, 41 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m
index 82a0165c1..9cb17a9e0 100644
--- a/Example Apps/Example ObjC/ProxyManager.m
+++ b/Example Apps/Example ObjC/ProxyManager.m
@@ -229,8 +229,7 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma mark - SDLManagerDelegate
-
-/// Called when the connection beween this app and the module has closed.
+/// Called when the connection between this app and the module has closed.
- (void)managerDidDisconnect {
if (self.state != ProxyStateStopped) {
[self sdlex_updateProxyState:ProxyStateSearchingForConnection];
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index 5fb0fda22..6c04e57fa 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -147,7 +147,7 @@ private extension ProxyManager {
extension ProxyManager: SDLManagerDelegate {
/// Called when the connection between this app and the module has closed.
- func managerDidDisconnect() {
+ func managerDidDisconnect() {
if delegate?.proxyState != .some(.stopped) {
delegate?.didChangeProxyState(ProxyState.searching)
}
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 440bf0dcb..57fe1482a 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -284,6 +284,7 @@
2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */; };
4A1B036F24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */; };
4A1FA09B25114833006B7851 /* SDLErrorConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A1FA09A25114833006B7851 /* SDLErrorConstants.m */; };
+ 4A39C6FA25E84C87005C8943 /* SDLKeyboardCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B3A9D9DF25D2571000CDFD21 /* SDLKeyboardCapabilities.m */; };
4A40254124FFDA660080E159 /* SDLTextAndGraphicState.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A40253D24FFDA660080E159 /* SDLTextAndGraphicState.m */; };
4A40254224FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A40253E24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.h */; };
4A40254324FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A40253F24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.m */; };
@@ -1690,7 +1691,6 @@
B38D8E7E24A118BD00B977D0 /* SDLGearStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7D24A118BD00B977D0 /* SDLGearStatusSpec.m */; };
B38D8E8024A1E3D000B977D0 /* SDLTransmissionTypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7F24A1E3D000B977D0 /* SDLTransmissionTypeSpec.m */; };
B38D8E8224A1F53500B977D0 /* SDLCapacityUnitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */; };
- B3A9D9E125D2571000CDFD21 /* SDLKeyboardCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B3A9D9DF25D2571000CDFD21 /* SDLKeyboardCapabilities.m */; };
B3A9D9E225D2571000CDFD21 /* SDLKeyboardCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = B3A9D9E025D2571000CDFD21 /* SDLKeyboardCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
B3A9D9E725D2578F00CDFD21 /* SDLKeyboardLayoutCapability.m in Sources */ = {isa = PBXBuildFile; fileRef = B3A9D9E525D2578F00CDFD21 /* SDLKeyboardLayoutCapability.m */; };
B3A9D9E825D2578F00CDFD21 /* SDLKeyboardLayoutCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = B3A9D9E625D2578F00CDFD21 /* SDLKeyboardLayoutCapability.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -4052,7 +4052,6 @@
B3EC9E6D2579AA010039F3AA /* SDLClimateDataSpec.m */,
885468372225CBA400994D8D /* SDLCloudAppPropertiesSpec.m */,
162E82951A9BDE8A00906325 /* SDLClusterModeStatusSpec.m */,
- B3992641258FAADF0048F09B /* SDLConfigurableKeyboardsSpec.m */,
DA9F7EB31DCC086400ACAE48 /* SDLDateTimeSpec.m */,
162E82961A9BDE8A00906325 /* SDLDeviceInfoSpec.m */,
162E82971A9BDE8A00906325 /* SDLDeviceStatusSpec.m */,
@@ -5112,8 +5111,6 @@
4ABB2B2124F84EF00061BF55 /* SDLCloudAppProperties.m */,
4ABB2B3224F84EF30061BF55 /* SDLClusterModeStatus.h */,
4ABB2B3024F84EF30061BF55 /* SDLClusterModeStatus.m */,
- B3992632258C276B0048F09B /* SDLConfigurableKeyboards.h */,
- B3992631258C276A0048F09B /* SDLConfigurableKeyboards.m */,
4ABB2B2D24F84EF20061BF55 /* SDLDateTime.h */,
4ABB2B2324F84EF00061BF55 /* SDLDateTime.m */,
4ABB2B1F24F84EF00061BF55 /* SDLDeviceInfo.h */,
@@ -5180,8 +5177,6 @@
4ABB2B9724F850AD0061BF55 /* SDLLightControlData.m */,
4ABB2B9424F850AC0061BF55 /* SDLLightState.h */,
4ABB2B9A24F850AD0061BF55 /* SDLLightState.m */,
- B3992622258C1E480048F09B /* SDLKeyboardCapabilities.h */,
- B3992621258C1E480048F09B /* SDLKeyboardCapabilities.m */,
4A8BD22724F93132000945E3 /* SDLKeyboardProperties.h */,
4A8BD23A24F93135000945E3 /* SDLKeyboardProperties.m */,
4A8BD22824F93132000945E3 /* SDLLocationCoordinate.h */,
@@ -5413,8 +5408,6 @@
4ABB278224F7FF090061BF55 /* SDLInteractionMode.m */,
4ABB278624F7FF0A0061BF55 /* SDLKeyboardEvent.h */,
4ABB277E24F7FF090061BF55 /* SDLKeyboardEvent.m */,
- B3992627258C24120048F09B /* SDLKeyboardInputMask.h */,
- B3992628258C24130048F09B /* SDLKeyboardInputMask.m */,
4ABB278B24F7FF0B0061BF55 /* SDLKeyboardLayout.h */,
4ABB277F24F7FF090061BF55 /* SDLKeyboardLayout.m */,
4ABB278824F7FF0A0061BF55 /* SDLKeypressMode.h */,
@@ -7048,7 +7041,6 @@
B3838A20257C5BB000420C11 /* SDLRoofStatus.h in Headers */,
4ABB271824F7FC4E0061BF55 /* SDLCompassDirection.h in Headers */,
4ABB2B5924F84EF50061BF55 /* SDLDeviceStatus.h in Headers */,
- B3992629258C24130048F09B /* SDLKeyboardInputMask.h in Headers */,
4A8BD2CF24F93803000945E3 /* SDLTouchEvent.h in Headers */,
4ABB264B24F7F5580061BF55 /* SDLManagerDelegate.h in Headers */,
4A8BD28B24F934F3000945E3 /* SDLRGBColor.h in Headers */,
@@ -7072,7 +7064,6 @@
4ABB2AB524F847F40061BF55 /* SDLShowAppMenuResponse.h in Headers */,
4A8BD3C724F998A8000945E3 /* SDLWindowState.h in Headers */,
4ABB286424F828E00061BF55 /* SDLVehicleDataNotificationStatus.h in Headers */,
- B3992624258C1E490048F09B /* SDLKeyboardCapabilities.h in Headers */,
4ABB287C24F8294A0061BF55 /* SDLVentilationMode.h in Headers */,
4ABB292F24F842A00061BF55 /* SDLDeleteFile.h in Headers */,
4ABB294924F843440061BF55 /* SDLEncodedSyncPData.h in Headers */,
@@ -7311,7 +7302,6 @@
4ABB2A3124F847980061BF55 /* SDLDeleteFileResponse.h in Headers */,
4ABB294C24F843440061BF55 /* SDLEndAudioPassThru.h in Headers */,
4ABB2AD524F848130061BF55 /* SDLSubscribeVehicleDataResponse.h in Headers */,
- B3992634258C276B0048F09B /* SDLConfigurableKeyboards.h in Headers */,
4ABB251224F7E3A30061BF55 /* SDLLifecycleConfiguration.h in Headers */,
4ABB25F624F7E7EF0061BF55 /* SDLTouch.h in Headers */,
4ABB2A8324F847DF0061BF55 /* SDLResetGlobalPropertiesResponse.h in Headers */,
@@ -7889,7 +7879,6 @@
4ABB2AD224F848130061BF55 /* SDLSubscribeWayPointsResponse.m in Sources */,
4ABB286224F828E00061BF55 /* SDLVehicleDataResultCode.m in Sources */,
4ABB2B8A24F8504A0061BF55 /* SDLHMISettingsControlCapabilities.m in Sources */,
- B3992623258C1E490048F09B /* SDLKeyboardCapabilities.m in Sources */,
4ABB257A24F7E5FF0061BF55 /* SDLPresentKeyboardOperation.m in Sources */,
4ABB27CA24F8006D0061BF55 /* SDLMediaType.m in Sources */,
4ABB264524F7F5340061BF55 /* SDLSystemCapabilityManager.m in Sources */,
@@ -7902,7 +7891,6 @@
4ABB25A324F7E6CE0061BF55 /* SDLDynamicMenuUpdateAlgorithm.m in Sources */,
4A8BD30C24F938D6000945E3 /* SDLWeatherAlert.m in Sources */,
4ABB250924F596920061BF55 /* SDLFileWrapper.m in Sources */,
- B399262A258C24130048F09B /* SDLKeyboardInputMask.m in Sources */,
4ABB24E324F5948D0061BF55 /* SDLEncryptionConfiguration.m in Sources */,
4ABB273D24F7FD1D0061BF55 /* SDLDimension.m in Sources */,
4ABB267B24F7F6840061BF55 /* SDLIconArchiveFile.m in Sources */,
@@ -8225,7 +8213,6 @@
4ABB251724F7E3AC0061BF55 /* SDLLifecycleConfigurationUpdate.m in Sources */,
4ABB24F824F5959E0061BF55 /* SDLAsynchronousOperation.m in Sources */,
4A8BD37624F9465E000945E3 /* SDLProtocol.m in Sources */,
- B3992633258C276B0048F09B /* SDLConfigurableKeyboards.m in Sources */,
4A8BD34D24F945E8000945E3 /* SDLControlFramePayloadRPCStartService.m in Sources */,
4A8BD36524F9461A000945E3 /* SDLV2ProtocolMessage.m in Sources */,
4ABB29BE24F845DB0061BF55 /* SDLSlider.m in Sources */,
@@ -8234,6 +8221,7 @@
4ABB2B9F24F850AE0061BF55 /* SDLImageResolution.m in Sources */,
4ABB29B424F845DB0061BF55 /* SDLSpeak.m in Sources */,
4A8BD3AF24F98ACE000945E3 /* SDLLogManager.m in Sources */,
+ 4A39C6FA25E84C87005C8943 /* SDLKeyboardCapabilities.m in Sources */,
4ABB257124F7E5E80061BF55 /* SDLPresentChoiceSetOperation.m in Sources */,
4ABB2A5624F847B10061BF55 /* SDLGetWayPointsResponse.m in Sources */,
4ABB24F524F595120061BF55 /* SDLArtwork.m in Sources */,
@@ -8436,7 +8424,6 @@
1680B11E1A9CD7AD00DBD79E /* SDLProtocolReceivedMessageRouterSpec.m in Sources */,
162E82FD1A9BDE8B00906325 /* SDLSystemContextSpec.m in Sources */,
162E82E21A9BDE8B00906325 /* SDLIgnitionStableStatusSpec.m in Sources */,
- B3992642258FAAE00048F09B /* SDLConfigurableKeyboardsSpec.m in Sources */,
162E82EE1A9BDE8B00906325 /* SDLMediaClockFormatSpec.m in Sources */,
5D76751822D921CB00E8D71A /* SDLMenuLayoutSpec.m in Sources */,
5DA026901AD44EE700019F86 /* SDLDialNumberResponseSpec.m in Sources */,
@@ -8724,7 +8711,6 @@
162E82FE1A9BDE8B00906325 /* SDLTBTStateSpec.m in Sources */,
5DB1BCD41D243A8E002FFC37 /* SDLListFilesOperationSpec.m in Sources */,
8863747E22D650DE00D2671F /* SDLCloseApplicationSpec.m in Sources */,
- B3992650258FABF70048F09B /* SDLKeyboardInputMaskSpec.m in Sources */,
162E834B1A9BDE8B00906325 /* SDLAlertManeuverResponseSpec.m in Sources */,
162E833E1A9BDE8B00906325 /* SDLShowSpec.m in Sources */,
5D6035D8202CF5C900A429C9 /* TestRequestProgressResponse.m in Sources */,
@@ -8734,7 +8720,6 @@
162E82EF1A9BDE8B00906325 /* SDLPermissionStatusSpec.m in Sources */,
881F388D22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m in Sources */,
8BA12B1822DCF59700371E82 /* SDLUnpublishAppServiceResponseSpec.m in Sources */,
- B399264A258FAB6B0048F09B /* SDLKeyboardCapabilitiesSpec.m in Sources */,
DA9F7EA61DCC05F500ACAE48 /* SDLUnsubscribeWaypointsSpec.m in Sources */,
1E89B0E2203196B800A47992 /* SDLSeatControlCapabilitiesSpec.m in Sources */,
162E82F01A9BDE8B00906325 /* SDLPowerModeQualificationStatusSpec.m in Sources */,
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVehicleTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVehicleTypeSpec.m
index a4f3efa0d..207667dd5 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVehicleTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVehicleTypeSpec.m
@@ -14,41 +14,57 @@
QuickSpecBegin(SDLVehicleTypeSpec)
describe(@"Getter/Setter Tests", ^ {
+ NSString *make = @"make";
+ NSString *model = @"model";
+ NSString *modelYear = @"modelYear";
+ NSString *trim = @"trim";
+
it(@"Should set and get correctly", ^ {
- SDLVehicleType* testStruct = [[SDLVehicleType alloc] init];
+ SDLVehicleType *testStruct = [[SDLVehicleType alloc] init];
- testStruct.make = @"Make";
- testStruct.model = @"Model";
- testStruct.modelYear = @"3.141*10^36";
- testStruct.trim = @"AE";
+ testStruct.make = make;
+ testStruct.model = model;
+ testStruct.modelYear = modelYear;
+ testStruct.trim = trim;
- expect(testStruct.make).to(equal(@"Make"));
- expect(testStruct.model).to(equal(@"Model"));
- expect(testStruct.modelYear).to(equal(@"3.141*10^36"));
- expect(testStruct.trim).to(equal(@"AE"));
+ expect(testStruct.make).to(equal(make));
+ expect(testStruct.model).to(equal(model));
+ expect(testStruct.modelYear).to(equal(modelYear));
+ expect(testStruct.trim).to(equal(trim));
});
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameMake:@"Make",
- SDLRPCParameterNameModel:@"Model",
- SDLRPCParameterNameModelYear:@"3.141*10^36",
- SDLRPCParameterNameTrim:@"AE"} mutableCopy];
- SDLVehicleType* testStruct = [[SDLVehicleType alloc] initWithDictionary:dict];
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+ NSDictionary *dict = @{
+ SDLRPCParameterNameMake: make,
+ SDLRPCParameterNameModel: model,
+ SDLRPCParameterNameModelYear: modelYear,
+ SDLRPCParameterNameTrim: trim
+ };
+ SDLVehicleType *testStruct = [[SDLVehicleType alloc] initWithDictionary:dict];
- expect(testStruct.make).to(equal(@"Make"));
- expect(testStruct.model).to(equal(@"Model"));
- expect(testStruct.modelYear).to(equal(@"3.141*10^36"));
- expect(testStruct.trim).to(equal(@"AE"));
+ expect(testStruct.make).to(equal(make));
+ expect(testStruct.model).to(equal(model));
+ expect(testStruct.modelYear).to(equal(modelYear));
+ expect(testStruct.trim).to(equal(trim));
});
- it(@"Should return nil if not set", ^ {
- SDLVehicleType* testStruct = [[SDLVehicleType alloc] init];
+ it(@"should initialize correctly with init", ^ {
+ SDLVehicleType *testStruct = [[SDLVehicleType alloc] init];
expect(testStruct.make).to(beNil());
expect(testStruct.model).to(beNil());
expect(testStruct.modelYear).to(beNil());
expect(testStruct.trim).to(beNil());
});
+
+ it(@"should initialize correctly with initWithMake:model:modelYear:trim:", ^{
+ SDLVehicleType *testStruct = [[SDLVehicleType alloc] initWithMake:make model:model modelYear:modelYear trim:trim];
+
+ expect(testStruct.make).to(equal(make));
+ expect(testStruct.model).to(equal(model));
+ expect(testStruct.modelYear).to(equal(modelYear));
+ expect(testStruct.trim).to(equal(trim));
+ });
});
QuickSpecEnd