summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Gluck <justin.gluck@livio.io>2019-03-18 11:43:11 -0400
committerJustin Gluck <justin.gluck@livio.io>2019-03-18 11:43:11 -0400
commitcb8c33a57b2cedc14b2d0050d69cf04fb4ac01d3 (patch)
treefc17b3b8b9f3ec65d57ca00113536ee9caef3c3f
parentdfa80bccd2ffdceba6c84476a7401461e03e6213 (diff)
parenta5c9b920af564c5a7747483a60475706b5ffd5b0 (diff)
downloadsdl_ios-cb8c33a57b2cedc14b2d0050d69cf04fb4ac01d3.tar.gz
Merge branch 'develop' into feature/issue_-1185_swift_update
-rw-r--r--SmartDeviceLink/SDLAppServiceData.h2
-rw-r--r--SmartDeviceLink/SDLGetAppServiceData.h8
-rw-r--r--SmartDeviceLink/SDLGetAppServiceData.m4
-rw-r--r--SmartDeviceLink/SDLGetAppServiceDataResponse.h6
-rw-r--r--SmartDeviceLink/SDLGetAppServiceDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetFile.h2
-rw-r--r--SmartDeviceLink/SDLGetFileResponse.h4
-rw-r--r--SmartDeviceLink/SDLNavigationInstruction.h2
-rw-r--r--SmartDeviceLink/SDLPerformAppServiceInteraction.h2
-rw-r--r--SmartDeviceLink/SDLPerformAppServiceInteractionResponse.h4
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h2
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m2
-rw-r--r--SmartDeviceLink/SDLSendLocation.h54
-rw-r--r--SmartDeviceLink/SDLSendLocation.m16
-rw-r--r--SmartDeviceLink/SDLWeatherData.h11
-rw-r--r--SmartDeviceLink/SDLWeatherData.m13
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m7
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m222
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWeatherDataSpec.m19
19 files changed, 192 insertions, 192 deletions
diff --git a/SmartDeviceLink/SDLAppServiceData.h b/SmartDeviceLink/SDLAppServiceData.h
index af2ec4ded..ff6d487f5 100644
--- a/SmartDeviceLink/SDLAppServiceData.h
+++ b/SmartDeviceLink/SDLAppServiceData.h
@@ -18,7 +18,7 @@
NS_ASSUME_NONNULL_BEGIN
/*
- * Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object. (eg if service type equals MEDIA, the mediaServiceData param should be included.
+ * Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object (e.g. if the service type is MEDIA, the mediaServiceData param should be included).
*/
@interface SDLAppServiceData : SDLRPCStruct
diff --git a/SmartDeviceLink/SDLGetAppServiceData.h b/SmartDeviceLink/SDLGetAppServiceData.h
index eaec788b9..78ceee436 100644
--- a/SmartDeviceLink/SDLGetAppServiceData.h
+++ b/SmartDeviceLink/SDLGetAppServiceData.h
@@ -35,6 +35,14 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithAppServiceType:(SDLAppServiceType)serviceType;
/**
+ * Convenience init for subscribing to a service type.
+ *
+ * @param serviceType The app service type
+ * @return A SDLGetAppServiceData object
+ */
+- (instancetype)initAndSubscribeToAppServiceType:(SDLAppServiceType)serviceType;
+
+/**
* Convenience init for all parameters.
*
* @param serviceType The app service type
diff --git a/SmartDeviceLink/SDLGetAppServiceData.m b/SmartDeviceLink/SDLGetAppServiceData.m
index 778741303..0122fb088 100644
--- a/SmartDeviceLink/SDLGetAppServiceData.m
+++ b/SmartDeviceLink/SDLGetAppServiceData.m
@@ -37,6 +37,10 @@ NS_ASSUME_NONNULL_BEGIN
return [self initWithServiceType:serviceType];
}
+- (instancetype)initAndSubscribeToAppServiceType:(SDLAppServiceType)serviceType {
+ return [self initWithServiceType:serviceType subscribe:YES];
+}
+
- (instancetype)initWithServiceType:(NSString *)serviceType subscribe:(BOOL)subscribe {
self = [self initWithServiceType:serviceType];
if (!self) {
diff --git a/SmartDeviceLink/SDLGetAppServiceDataResponse.h b/SmartDeviceLink/SDLGetAppServiceDataResponse.h
index cd05e4710..ca94c1790 100644
--- a/SmartDeviceLink/SDLGetAppServiceDataResponse.h
+++ b/SmartDeviceLink/SDLGetAppServiceDataResponse.h
@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
/*
- * This response includes the data that is requested from the specific service.
+ * This response includes the data that was requested from the specific service.
*/
@interface SDLGetAppServiceDataResponse : SDLRPCResponse
@@ -28,9 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains all the current data of the app service.
*
- * SDLAppServiceData, Required
+ * SDLAppServiceData, Optional
*/
-@property (strong, nonatomic) SDLAppServiceData *serviceData;
+@property (nullable, strong, nonatomic) SDLAppServiceData *serviceData;
@end
diff --git a/SmartDeviceLink/SDLGetAppServiceDataResponse.m b/SmartDeviceLink/SDLGetAppServiceDataResponse.m
index b79ae6420..c1302aaf9 100644
--- a/SmartDeviceLink/SDLGetAppServiceDataResponse.m
+++ b/SmartDeviceLink/SDLGetAppServiceDataResponse.m
@@ -34,11 +34,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (void)setServiceData:(SDLAppServiceData *)serviceData {
+- (void)setServiceData:(nullable SDLAppServiceData *)serviceData {
[parameters sdl_setObject:serviceData forName:SDLRPCParameterNameServiceData];
}
-- (SDLAppServiceData *)serviceData {
+- (nullable SDLAppServiceData *)serviceData {
return [parameters sdl_objectForName:SDLRPCParameterNameServiceData ofClass:SDLAppServiceData.class];
}
diff --git a/SmartDeviceLink/SDLGetFile.h b/SmartDeviceLink/SDLGetFile.h
index 3a63ab737..bdc7936d9 100644
--- a/SmartDeviceLink/SDLGetFile.h
+++ b/SmartDeviceLink/SDLGetFile.h
@@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *offset;
/**
- * Optional length in bytes for resuming partial data chunks if offset is set to 0, then length is the total length of the file to be downloaded.
+ * Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded.
*
* Integer, Optional, minvalue="0" maxvalue="2000000000"
*/
diff --git a/SmartDeviceLink/SDLGetFileResponse.h b/SmartDeviceLink/SDLGetFileResponse.h
index 96164d3bf..cf6a5cef9 100644
--- a/SmartDeviceLink/SDLGetFileResponse.h
+++ b/SmartDeviceLink/SDLGetFileResponse.h
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
* Convenience init for all parameters.
*
* @param offset Optional offset in bytes for resuming partial data chunks
- * @param length Optional length in bytes for resuming partial data chunks if offset is set to 0, then length is the total length of the file to be downloaded
+ * @param length Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded
* @param fileType File type that is being sent in response
* @param crc Additional CRC32 checksum to protect data integrity up to 512 Mbits
* @return A SDLGetFileResponse object
@@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *offset;
/**
- * Optional length in bytes for resuming partial data chunks if offset is set to 0, then length is the total length of the file to be downloaded.
+ * Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded.
*
* Integer, Optional, minvalue="0" maxvalue="2000000000"
*/
diff --git a/SmartDeviceLink/SDLNavigationInstruction.h b/SmartDeviceLink/SDLNavigationInstruction.h
index ee9241895..88b347fc5 100644
--- a/SmartDeviceLink/SDLNavigationInstruction.h
+++ b/SmartDeviceLink/SDLNavigationInstruction.h
@@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) SDLNavigationJunction junctionType;
/**
- * Used to infer which side of the road this instruction takes place. For a U-Turn (Action=Turn, direction=180) this will determine which direction the turn should take place.
+ * Used to infer which side of the road this instruction takes place. For a U-Turn (action=TURN, bearing=180) this will determine which direction the turn should take place.
*
* SDLDirection, Optional
*/
diff --git a/SmartDeviceLink/SDLPerformAppServiceInteraction.h b/SmartDeviceLink/SDLPerformAppServiceInteraction.h
index 6d69c8323..f85c66387 100644
--- a/SmartDeviceLink/SDLPerformAppServiceInteraction.h
+++ b/SmartDeviceLink/SDLPerformAppServiceInteraction.h
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithServiceUri:(NSString *)serviceUri serviceID:(NSString *)serviceID originApp:(NSString *)originApp requestServiceActive:(BOOL)requestServiceActive;
/**
- * Fully qualified URI based on the URI prefix and URI scheme the app service provided. SDL makes no gurantee that this URI is correct.
+ * Fully qualified URI based on a predetermined scheme provided by the app service. SDL makes no guarantee that this URI is correct.
*
* String, Required
*/
diff --git a/SmartDeviceLink/SDLPerformAppServiceInteractionResponse.h b/SmartDeviceLink/SDLPerformAppServiceInteractionResponse.h
index 8fbadebf2..7d5d6cc13 100644
--- a/SmartDeviceLink/SDLPerformAppServiceInteractionResponse.h
+++ b/SmartDeviceLink/SDLPerformAppServiceInteractionResponse.h
@@ -19,13 +19,13 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Convenience init for all parameters.
*
- * @param serviceSpecificResult The service can provide specific result strings to the consumer through this param. These results should be described in the URI schema set in the Service Manifest
+ * @param serviceSpecificResult The service can provide specific result strings to the consumer through this param.
* @return A SDLPerformAppServiceInteractionResponse object
*/
- (instancetype)initWithServiceSpecificResult:(NSString *)serviceSpecificResult;
/**
- * The service can provide specific result strings to the consumer through this param. These results should be described in the URI schema set in the Service Manifest.
+ * The service can provide specific result strings to the consumer through this param.
*
* String, Optional
*/
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index 5c285bf97..55ce7eaa3 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -655,7 +655,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameVRSynonyms;
extern SDLRPCParameterName const SDLRPCParameterNameWayPoints;
extern SDLRPCParameterName const SDLRPCParameterNameWayPointType;
extern SDLRPCParameterName const SDLRPCParameterNameWeatherForLocationSupported;
-extern SDLRPCParameterName const SDLRPCParameterNameWeatherIconImageName;
+extern SDLRPCParameterName const SDLRPCParameterNameWeatherIcon;
extern SDLRPCParameterName const SDLRPCParameterNameWeatherServiceData;
extern SDLRPCParameterName const SDLRPCParameterNameWeatherServiceManifest;
extern SDLRPCParameterName const SDLRPCParameterNameWeatherSummary;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 20fe849d7..86d88c588 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -650,7 +650,7 @@ SDLRPCParameterName const SDLRPCParameterNameVRSynonyms = @"vrSynonyms";
SDLRPCParameterName const SDLRPCParameterNameWayPoints = @"wayPoints";
SDLRPCParameterName const SDLRPCParameterNameWayPointType = @"wayPointType";
SDLRPCParameterName const SDLRPCParameterNameWeatherForLocationSupported = @"weatherForLocationSupported";
-SDLRPCParameterName const SDLRPCParameterNameWeatherIconImageName = @"weatherIconImageName";
+SDLRPCParameterName const SDLRPCParameterNameWeatherIcon = @"weatherIcon";
SDLRPCParameterName const SDLRPCParameterNameWeatherServiceData = @"weatherServiceData";
SDLRPCParameterName const SDLRPCParameterNameWeatherServiceManifest = @"weatherServiceManifest";
SDLRPCParameterName const SDLRPCParameterNameWeatherSummary = @"weatherSummary";
diff --git a/SmartDeviceLink/SDLSendLocation.h b/SmartDeviceLink/SDLSendLocation.h
index c2d007604..0824ef7f2 100644
--- a/SmartDeviceLink/SDLSendLocation.h
+++ b/SmartDeviceLink/SDLSendLocation.h
@@ -15,21 +15,63 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLSendLocation : SDLRPCRequest
+/**
+ Create a `SendLocation` request with an address object, without Lat/Long coordinates.
+
+ @param address The address information to be passed to the nav system for determining the route
+ @param addressLines The user-facing address
+ @param locationName The user-facing name of the location
+ @param locationDescription The user-facing description of the location
+ @param phoneNumber The phone number for the location; the user could use this to call the location
+ @param image A user-facing image for the location
+ @param deliveryMode How the location should be sent to the nav system
+ @param timeStamp The estimated arrival time for the location (this will also likely be calculated by the nav system later, and may be different than your estimate). This is used to show the user approximately how long it would take to navigate here
+ @return A `SendLocation` object
+ */
+- (instancetype)initWithAddress:(SDLOasisAddress *)address addressLines:(nullable NSArray<NSString *> *)addressLines locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image deliveryMode:(nullable SDLDeliveryMode)deliveryMode timeStamp:(nullable SDLDateTime *)timeStamp;
+
+/**
+ Create a `SendLocation` request with Lat/Long coordinate, not an address object
+
+ @param longitude The longitudinal coordinate of the location
+ @param latitude The latitudinal coordinate of the location
+ @param locationName The user-facing name of the location
+ @param locationDescription The user-facing description of the location
+ @param address The user-facing address
+ @param phoneNumber The phone number for the location; the user could use this to call the location
+ @param image A user-facing image for the location
+ @return A `SendLocation` object
+ */
- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription address:(nullable NSArray<NSString *> *)address phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image;
+/**
+ Create a `SendLocation` request with Lat/Long coordinate and an address object and let the nav system decide how to parse it
+
+ @param longitude The longitudinal coordinate of the location
+ @param latitude The latitudinal coordinate of the location
+ @param locationName The user-facing name of the location
+ @param locationDescription The user-facing description of the location
+ @param displayAddressLines The user-facing address
+ @param phoneNumber The phone number for the location; the user could use this to call the location
+ @param image A user-facing image for the location
+ @param deliveryMode How the location should be sent to the nav system
+ @param timeStamp The estimated arrival time for the location (this will also likely be calculated by the nav system later, and may be different than your estimate). This is used to show the user approximately how long it would take to navigate here
+ @param address The address information to be passed to the nav system for determining the route
+ @return A `SendLocation` object
+ */
- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription displayAddressLines:(nullable NSArray<NSString *> *)displayAddressLines phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image deliveryMode:(nullable SDLDeliveryMode)deliveryMode timeStamp:(nullable SDLDateTime *)timeStamp address:(nullable SDLOasisAddress *)address;
/**
- * The longitudinal coordinate of the location.
+ * The longitudinal coordinate of the location. Either the latitude / longitude OR the `address` must be provided.
*
- * Float, Required, -180.0 - 180.0
+ * Float, Optional, -180.0 - 180.0
*/
@property (nullable, copy, nonatomic) NSNumber<SDLFloat> *longitudeDegrees;
/**
- * The latitudinal coordinate of the location.
+ * The latitudinal coordinate of the location. Either the latitude / longitude OR the `address` must be provided.
*
- * Float, Required, -90.0 - 90.0
+ * Float, Optional, -90.0 - 90.0
*/
@property (nullable, copy, nonatomic) NSNumber<SDLFloat> *latitudeDegrees;
@@ -48,7 +90,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, copy, nonatomic) NSString *locationDescription;
/**
- * Location address for display purposes only
+ * Location address for display purposes only.
*
* Contains String, Optional, Max Array Length = 4, Max String Length = 500
*/
@@ -83,7 +125,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) SDLDateTime *timeStamp;
/**
- * Address to be used for setting destination
+ * Address to be used for setting destination. Either the latitude / longitude OR the `address` must be provided.
*
* Optional
*/
diff --git a/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink/SDLSendLocation.m
index 2c630e700..f35c4aed8 100644
--- a/SmartDeviceLink/SDLSendLocation.m
+++ b/SmartDeviceLink/SDLSendLocation.m
@@ -21,6 +21,22 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithAddress:(SDLOasisAddress *)address addressLines:(nullable NSArray<NSString *> *)addressLines locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image deliveryMode:(nullable SDLDeliveryMode)deliveryMode timeStamp:(nullable SDLDateTime *)timeStamp {
+ self = [self init];
+ if (!self) { return nil; }
+
+ self.address = address;
+ self.addressLines = addressLines;
+ self.locationName = locationName;
+ self.locationDescription = locationDescription;
+ self.phoneNumber = phoneNumber;
+ self.locationImage = image;
+ self.deliveryMode = deliveryMode;
+ self.timeStamp = timeStamp;
+
+ return self;
+}
+
- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription address:(nullable NSArray<NSString *> *)address phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image {
return [self initWithLongitude:longitude latitude:latitude locationName:locationName locationDescription:locationDescription displayAddressLines:address phoneNumber:phoneNumber image:image deliveryMode:nil timeStamp:nil address:nil];
}
diff --git a/SmartDeviceLink/SDLWeatherData.h b/SmartDeviceLink/SDLWeatherData.h
index 28bc3a434..56405ea6d 100644
--- a/SmartDeviceLink/SDLWeatherData.h
+++ b/SmartDeviceLink/SDLWeatherData.h
@@ -9,6 +9,7 @@
#import "SDLRPCRequest.h"
@class SDLDateTime;
+@class SDLImage;
@class SDLTemperature;
@@ -40,10 +41,10 @@ NS_ASSUME_NONNULL_BEGIN
* @param precipProbability From 0 to 1, percentage chance
* @param precipType A description of the precipitation type (e.g. "rain", "snow", "sleet", "hail")
* @param visibility In km
- * @param weatherIconImageName Name of the icon
+ * @param weatherIcon The weather icon image
* @return A SDLWeatherData object
*/
-- (instancetype)initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature temperatureHigh:(nullable SDLTemperature *)temperatureHigh temperatureLow:(nullable SDLTemperature *)temperatureLow apparentTemperature:(nullable SDLTemperature *)apparentTemperature apparentTemperatureHigh:(nullable SDLTemperature *)apparentTemperatureHigh apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow weatherSummary:(nullable NSString *)weatherSummary time:(nullable SDLDateTime *)time humidity:(nullable NSNumber<SDLFloat> *)humidity cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase windBearing:(nullable NSNumber<SDLInt> *)windBearing windGust:(nullable NSNumber<SDLFloat> *)windGust windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability precipType:(nullable NSString *)precipType visibility:(nullable NSNumber<SDLFloat> *)visibility weatherIconImageName:(nullable NSString *)weatherIconImageName;
+- (instancetype)initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature temperatureHigh:(nullable SDLTemperature *)temperatureHigh temperatureLow:(nullable SDLTemperature *)temperatureLow apparentTemperature:(nullable SDLTemperature *)apparentTemperature apparentTemperatureHigh:(nullable SDLTemperature *)apparentTemperatureHigh apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow weatherSummary:(nullable NSString *)weatherSummary time:(nullable SDLDateTime *)time humidity:(nullable NSNumber<SDLFloat> *)humidity cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase windBearing:(nullable NSNumber<SDLInt> *)windBearing windGust:(nullable NSNumber<SDLFloat> *)windGust windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability precipType:(nullable NSString *)precipType visibility:(nullable NSNumber<SDLFloat> *)visibility weatherIcon:(nullable SDLImage *)weatherIcon;
/**
* The current temperature.
@@ -193,11 +194,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *visibility;
/**
- * Name of the icon
+ * The weather icon image.
*
- * String, Optional
+ * SDLImage, Optional
*/
-@property (nullable, strong, nonatomic) NSString *weatherIconImageName;
+@property (nullable, strong, nonatomic) SDLImage *weatherIcon;
@end
diff --git a/SmartDeviceLink/SDLWeatherData.m b/SmartDeviceLink/SDLWeatherData.m
index 408cdccaa..36dd54ccc 100644
--- a/SmartDeviceLink/SDLWeatherData.m
+++ b/SmartDeviceLink/SDLWeatherData.m
@@ -10,6 +10,7 @@
#import "NSMutableDictionary+Store.h"
#import "SDLDateTime.h"
+#import "SDLImage.h"
#import "SDLRPCParameterNames.h"
#import "SDLTemperature.h"
@@ -17,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLWeatherData
-- (instancetype)initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature temperatureHigh:(nullable SDLTemperature *)temperatureHigh temperatureLow:(nullable SDLTemperature *)temperatureLow apparentTemperature:(nullable SDLTemperature *)apparentTemperature apparentTemperatureHigh:(nullable SDLTemperature *)apparentTemperatureHigh apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow weatherSummary:(nullable NSString *)weatherSummary time:(nullable SDLDateTime *)time humidity:(nullable NSNumber<SDLFloat> *)humidity cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase windBearing:(nullable NSNumber<SDLInt> *)windBearing windGust:(nullable NSNumber<SDLFloat> *)windGust windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability precipType:(nullable NSString *)precipType visibility:(nullable NSNumber<SDLFloat> *)visibility weatherIconImageName:(nullable NSString *)weatherIconImageName {
+- (instancetype)initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature temperatureHigh:(nullable SDLTemperature *)temperatureHigh temperatureLow:(nullable SDLTemperature *)temperatureLow apparentTemperature:(nullable SDLTemperature *)apparentTemperature apparentTemperatureHigh:(nullable SDLTemperature *)apparentTemperatureHigh apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow weatherSummary:(nullable NSString *)weatherSummary time:(nullable SDLDateTime *)time humidity:(nullable NSNumber<SDLFloat> *)humidity cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase windBearing:(nullable NSNumber<SDLInt> *)windBearing windGust:(nullable NSNumber<SDLFloat> *)windGust windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability precipType:(nullable NSString *)precipType visibility:(nullable NSNumber<SDLFloat> *)visibility weatherIcon:(nullable SDLImage *)weatherIcon {
self = [self init];
if (!self) {
return nil;
@@ -44,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
self.precipProbability = precipProbability;
self.precipType = precipType;
self.visibility = visibility;
- self.weatherIconImageName = weatherIconImageName;
+ self.weatherIcon = weatherIcon;
return self;
}
@@ -217,12 +218,12 @@ NS_ASSUME_NONNULL_BEGIN
return [store sdl_objectForName:SDLRPCParameterNameVisibility];
}
-- (void)setWeatherIconImageName:(nullable NSString *)weatherIconImageName {
- [store sdl_setObject:weatherIconImageName forName:SDLRPCParameterNameWeatherIconImageName];
+- (void)setWeatherIcon:(nullable SDLImage *)weatherIcon {
+ [store sdl_setObject:weatherIcon forName:SDLRPCParameterNameWeatherIcon];
}
-- (nullable NSString *)weatherIconImageName {
- return [store sdl_objectForName:SDLRPCParameterNameWeatherIconImageName];
+- (nullable SDLImage *)weatherIcon {
+ return [store sdl_objectForName:SDLRPCParameterNameWeatherIcon ofClass:SDLImage.class];
}
@end
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
index a094ef46d..fcc89caea 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetAppServiceDataSpec.m
@@ -63,6 +63,13 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.subscribe).to(beNil());
});
+ it(@"Should initialize correctly with initAndSubscribeToAppServiceType:", ^{
+ SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initAndSubscribeToAppServiceType:testAppServiceType];
+
+ expect(testRequest.serviceType).to(equal(testAppServiceType));
+ expect(testRequest.subscribe).to(beTrue());
+ });
+
it(@"Should initialize correctly with initWithServiceType:subscribe:", ^{
SDLGetAppServiceData *testRequest = [[SDLGetAppServiceData alloc] initWithServiceType:testServiceType subscribe:testSubscribe];
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
index 43c02d4c4..244d3fdce 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
@@ -27,22 +27,21 @@ describe(@"Send Location RPC", ^{
describe(@"when initialized with init", ^{
beforeEach(^{
+ someLongitude = @123.4567;
+ someLatitude = @65.4321;
+ someLocation = @"Livio";
+ someLocationDescription = @"A great place to work";
+ someAddressLines = @[@"3136 Hilton Rd", @"Ferndale, MI", @"48220"];
+ somePhoneNumber = @"248-591-0333";
+ someImage = [[SDLImage alloc] init];
+ someDeliveryMode = SDLDeliveryModePrompt;
+ someTime = [[SDLDateTime alloc] init];
+ someAddress = [[SDLOasisAddress alloc] init];
testRequest = [[SDLSendLocation alloc] init];
});
context(@"when parameters are set correctly", ^{
beforeEach(^{
- someLongitude = @123.4567;
- someLatitude = @65.4321;
- someLocation = @"Livio";
- someLocationDescription = @"A great place to work";
- someAddressLines = @[@"3136 Hilton Rd", @"Ferndale, MI", @"48220"];
- somePhoneNumber = @"248-591-0333";
- someImage = [[SDLImage alloc] init];
- someDeliveryMode = SDLDeliveryModePrompt;
- someTime = [[SDLDateTime alloc] init];
- someAddress = [[SDLOasisAddress alloc] init];
-
testRequest.longitudeDegrees = someLongitude;
testRequest.latitudeDegrees = someLatitude;
testRequest.locationName = someLocation;
@@ -56,53 +55,16 @@ describe(@"Send Location RPC", ^{
});
// Since all the properties are immutable, a copy should be executed as a retain, which means they should be identical
- it(@"should get longitude correctly", ^{
- expect(testRequest.longitudeDegrees).to(equal(someLongitude));
+ it(@"should get parameters correctly", ^{
expect(testRequest.longitudeDegrees).to(beIdenticalTo(someLongitude));
- });
-
- it(@"should get latitude correctly", ^{
- expect(testRequest.latitudeDegrees).to(equal(someLatitude));
expect(testRequest.latitudeDegrees).to(beIdenticalTo(someLatitude));
- });
-
- it(@"should get location correctly", ^{
- expect(testRequest.locationName).to(equal(someLocation));
expect(testRequest.locationName).to(beIdenticalTo(someLocation));
- });
-
- it(@"should get location description correctly", ^{
- expect(testRequest.locationDescription).to(equal(someLocationDescription));
expect(testRequest.locationDescription).to(beIdenticalTo(someLocationDescription));
- });
-
- it(@"should get address lines correctly", ^{
- expect(testRequest.addressLines).to(equal(someAddressLines));
expect(testRequest.addressLines).to(beIdenticalTo(someAddressLines));
- });
-
- it(@"should get phone number correctly", ^{
- expect(testRequest.phoneNumber).to(equal(somePhoneNumber));
expect(testRequest.phoneNumber).to(beIdenticalTo(somePhoneNumber));
- });
-
- it(@"should get image correctly", ^{
- expect(testRequest.locationImage).to(equal(someImage));
expect(testRequest.locationImage).to(beIdenticalTo(someImage));
- });
-
- it(@"should get delivery mode correctly", ^{
- expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
expect(testRequest.deliveryMode).to(beIdenticalTo(someDeliveryMode));
- });
-
- it(@"should get timestamp correctly", ^{
- expect(testRequest.timeStamp).to(equal(someTime));
expect(testRequest.timeStamp).to(beIdenticalTo(someTime));
- });
-
- it(@"should get address correctly", ^{
- expect(testRequest.address).to(equal(someAddress));
expect(testRequest.address).to(beIdenticalTo(someAddress));
});
});
@@ -110,59 +72,81 @@ describe(@"Send Location RPC", ^{
context(@"when parameters are not set", ^{
it(@"should return nil for longitude", ^{
expect(testRequest.longitudeDegrees).to(beNil());
- });
-
- it(@"should return nil for latitude", ^{
expect(testRequest.latitudeDegrees).to(beNil());
- });
-
- it(@"should return nil for location", ^{
expect(testRequest.locationName).to(beNil());
- });
-
- it(@"should return nil for location description", ^{
expect(testRequest.locationDescription).to(beNil());
- });
-
- it(@"should return nil for address lines", ^{
expect(testRequest.addressLines).to(beNil());
- });
-
- it(@"should return nil for phone number", ^{
expect(testRequest.phoneNumber).to(beNil());
- });
-
- it(@"should return nil for image", ^{
expect(testRequest.locationImage).to(beNil());
- });
-
- it(@"should return nil for delivery mode", ^{
expect(testRequest.deliveryMode).to(beNil());
- });
-
- it(@"should return nil for timeStamp", ^{
expect(testRequest.timeStamp).to(beNil());
+ expect(testRequest.address).to(beNil());
});
-
- it(@"should return nil for address", ^{
+ });
+ });
+
+ describe(@"when initialized with convenience inits", ^{
+ context(@"initWithAddress: addressLines: locationName: locationDescription: phoneNumber: image: deliveryMode: timeStamp:", ^{
+ beforeEach(^{
+ testRequest = [[SDLSendLocation alloc] initWithAddress:someAddress addressLines:someAddressLines locationName:someLocation locationDescription:someLocationDescription phoneNumber:somePhoneNumber image:someImage deliveryMode:someDeliveryMode timeStamp:someTime];
+ });
+
+ it(@"should set parameters correctly", ^{
+ expect(testRequest.longitudeDegrees).to(beNil());
+ expect(testRequest.latitudeDegrees).to(beNil());
+ expect(testRequest.locationName).to(equal(someLocation));
+ expect(testRequest.locationDescription).to(equal(someLocationDescription));
+ expect(testRequest.addressLines).to(equal(someAddressLines));
+ expect(testRequest.phoneNumber).to(equal(somePhoneNumber));
+ expect(testRequest.locationImage).to(equal(someImage));
+ expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
+ expect(testRequest.timeStamp).to(equal(someTime));
+ expect(testRequest.address).to(equal(someAddress));
+ });
+ });
+
+ context(@"initWithLongitude: latitude: locationName: locationDescription: address: phoneNumber: image:", ^{
+ beforeEach(^{
+ testRequest = [[SDLSendLocation alloc] initWithLongitude:someLongitude.doubleValue latitude:someLatitude.doubleValue locationName:someLocation locationDescription:someLocationDescription address:someAddressLines phoneNumber:somePhoneNumber image:someImage];
+ });
+
+ it(@"should set parameters correctly", ^{
+ expect(testRequest.longitudeDegrees).to(equal(someLongitude));
+ expect(testRequest.latitudeDegrees).to(equal(someLatitude));
+ expect(testRequest.locationName).to(equal(someLocation));
+ expect(testRequest.locationDescription).to(equal(someLocationDescription));
+ expect(testRequest.addressLines).to(equal(someAddressLines));
+ expect(testRequest.phoneNumber).to(equal(somePhoneNumber));
+ expect(testRequest.locationImage).to(equal(someImage));
+ expect(testRequest.deliveryMode).to(beNil());
+ expect(testRequest.timeStamp).to(beNil());
expect(testRequest.address).to(beNil());
});
});
+
+ context(@"initWithLongitude: latitude: locationName: locationDescription: displayAddressLines: phoneNumber: image: deliveryMode: timeStamp: address:", ^{
+ beforeEach(^{
+ testRequest = [[SDLSendLocation alloc] initWithLongitude:someLongitude.doubleValue latitude:someLatitude.doubleValue locationName:someLocation locationDescription:someLocationDescription displayAddressLines:someAddressLines phoneNumber:somePhoneNumber image:someImage deliveryMode:someDeliveryMode timeStamp:someTime address:someAddress];
+ });
+
+ it(@"should set parameters correctly", ^{
+ expect(testRequest.longitudeDegrees).to(equal(someLongitude));
+ expect(testRequest.latitudeDegrees).to(equal(someLatitude));
+ expect(testRequest.locationName).to(equal(someLocation));
+ expect(testRequest.locationDescription).to(equal(someLocationDescription));
+ expect(testRequest.addressLines).to(equal(someAddressLines));
+ expect(testRequest.phoneNumber).to(equal(somePhoneNumber));
+ expect(testRequest.locationImage).to(equal(someImage));
+ expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
+ expect(testRequest.timeStamp).to(equal(someTime));
+ expect(testRequest.address).to(equal(someAddress));
+ });
+ });
});
describe(@"when initialized with a dictionary", ^{
context(@"when parameters are set correctly", ^{
beforeEach(^{
- someLongitude = @123.4567;
- someLatitude = @65.4321;
- someLocation = @"Livio";
- someLocationDescription = @"A great place to work";
- someAddressLines = @[@"3136 Hilton Rd", @"Ferndale, MI", @"48220"];
- somePhoneNumber = @"248-591-0333";
- someImage = [[SDLImage alloc] init];
- someDeliveryMode = SDLDeliveryModePrompt;
- someTime = [[SDLDateTime alloc] init];
- someAddress = [[SDLOasisAddress alloc] init];
NSDictionary *initDict = @{
SDLRPCParameterNameRequest: @{
SDLRPCParameterNameParameters: @{
@@ -185,53 +169,16 @@ describe(@"Send Location RPC", ^{
});
// Since all the properties are immutable, a copy should be executed as a retain, which means they should be identical
- it(@"should get longitude correctly", ^{
- expect(testRequest.longitudeDegrees).to(equal(someLongitude));
+ it(@"should get parameters correctly", ^{
expect(testRequest.longitudeDegrees).to(beIdenticalTo(someLongitude));
- });
-
- it(@"should get latitude correctly", ^{
- expect(testRequest.latitudeDegrees).to(equal(someLatitude));
expect(testRequest.latitudeDegrees).to(beIdenticalTo(someLatitude));
- });
-
- it(@"should get location correctly", ^{
- expect(testRequest.locationName).to(equal(someLocation));
expect(testRequest.locationName).to(beIdenticalTo(someLocation));
- });
-
- it(@"should get location description correctly", ^{
- expect(testRequest.locationDescription).to(equal(someLocationDescription));
expect(testRequest.locationDescription).to(beIdenticalTo(someLocationDescription));
- });
-
- it(@"should get address lines correctly", ^{
- expect(testRequest.addressLines).to(equal(someAddressLines));
expect(testRequest.addressLines).to(beIdenticalTo(someAddressLines));
- });
-
- it(@"should get phone number correctly", ^{
- expect(testRequest.phoneNumber).to(equal(somePhoneNumber));
expect(testRequest.phoneNumber).to(beIdenticalTo(somePhoneNumber));
- });
-
- it(@"should get image correctly", ^{
- expect(testRequest.locationImage).to(equal(someImage));
expect(testRequest.locationImage).to(beIdenticalTo(someImage));
- });
-
- it(@"should get delivery mode correctly", ^{
- expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
expect(testRequest.deliveryMode).to(beIdenticalTo(someDeliveryMode));
- });
-
- it(@"should get timestamp correctly", ^{
- expect(testRequest.timeStamp).to(equal(someTime));
expect(testRequest.timeStamp).to(beIdenticalTo(someTime));
- });
-
- it(@"should get address correctly", ^{
- expect(testRequest.address).to(equal(someAddress));
expect(testRequest.address).to(beIdenticalTo(someAddress));
});
});
@@ -247,43 +194,16 @@ describe(@"Send Location RPC", ^{
testRequest = [[SDLSendLocation alloc] initWithDictionary:[NSMutableDictionary dictionaryWithDictionary:initDict]];
});
- it(@"should return nil for longitude", ^{
+ it(@"should return nil for parameters", ^{
expect(testRequest.longitudeDegrees).to(beNil());
- });
-
- it(@"should return nil for latitude", ^{
expect(testRequest.latitudeDegrees).to(beNil());
- });
-
- it(@"should return nil for location", ^{
expect(testRequest.locationName).to(beNil());
- });
-
- it(@"should return nil for location description", ^{
expect(testRequest.locationDescription).to(beNil());
- });
-
- it(@"should return nil for address lines", ^{
expect(testRequest.addressLines).to(beNil());
- });
-
- it(@"should return nil for phone number", ^{
expect(testRequest.phoneNumber).to(beNil());
- });
-
- it(@"should return nil for image", ^{
expect(testRequest.locationImage).to(beNil());
- });
-
- it(@"should return nil for delivery mode", ^{
expect(testRequest.deliveryMode).to(beNil());
- });
-
- it(@"should return nil for timeStamp", ^{
expect(testRequest.timeStamp).to(beNil());
- });
-
- it(@"should return nil for address", ^{
expect(testRequest.address).to(beNil());
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWeatherDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWeatherDataSpec.m
index 757162aab..f46cb0539 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWeatherDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWeatherDataSpec.m
@@ -10,6 +10,7 @@
#import <Nimble/Nimble.h>
#import "SDLDateTime.h"
+#import "SDLImage.h"
#import "SDLRPCParameterNames.h"
#import "SDLTemperature.h"
#import "SDLWeatherData.h"
@@ -38,7 +39,7 @@ describe(@"Getter/Setter Tests", ^{
__block float testPrecipProbability = 0.45;
__block NSString *testPrecipType = nil;
__block float testVisibility = 0.1;
- __block NSString *testWeatherIconImageName = nil;
+ __block SDLImage *testWeatherIcon = nil;
beforeEach(^{
testCurrentTemp = [[SDLTemperature alloc] initWithUnit:SDLTemperatureUnitFahrenheit value:2];
@@ -50,7 +51,7 @@ describe(@"Getter/Setter Tests", ^{
testWeatherSummary = @"testWeatherSummary";
testTime = [[SDLDateTime alloc] initWithHour:4 minute:5];
testPrecipType = @"testPrecipType";
- testWeatherIconImageName = @"testWeatherIconImageName";
+ testWeatherIcon = [[SDLImage alloc] initWithName:@"testWeatherIcon" isTemplate:true];
});
it(@"Should set and get correctly", ^{
@@ -76,7 +77,7 @@ describe(@"Getter/Setter Tests", ^{
testStruct.precipProbability = @(testPrecipProbability);
testStruct.precipType = testPrecipType;
testStruct.visibility = @(testVisibility);
- testStruct.weatherIconImageName = testWeatherIconImageName;
+ testStruct.weatherIcon = testWeatherIcon;
expect(testStruct.currentTemperature).to(equal(testCurrentTemp));
expect(testStruct.temperatureHigh).to(equal(testTempHigh));
@@ -99,7 +100,7 @@ describe(@"Getter/Setter Tests", ^{
expect(testStruct.precipProbability).to(equal(testPrecipProbability));
expect(testStruct.precipType).to(equal(testPrecipType));
expect(testStruct.visibility).to(equal(testVisibility));
- expect(testStruct.weatherIconImageName).to(equal(testWeatherIconImageName));
+ expect(testStruct.weatherIcon).to(equal(testWeatherIcon));
});
it(@"Should get correctly when initialized with a dictionary", ^{
@@ -124,7 +125,7 @@ describe(@"Getter/Setter Tests", ^{
SDLRPCParameterNamePrecipProbability:@(testPrecipProbability),
SDLRPCParameterNamePrecipType:testPrecipType,
SDLRPCParameterNameVisibility:@(testVisibility),
- SDLRPCParameterNameWeatherIconImageName:testWeatherIconImageName
+ SDLRPCParameterNameWeatherIcon:testWeatherIcon
};
SDLWeatherData *testStruct = [[SDLWeatherData alloc] initWithDictionary:dict];
@@ -149,11 +150,11 @@ describe(@"Getter/Setter Tests", ^{
expect(testStruct.precipProbability).to(equal(testPrecipProbability));
expect(testStruct.precipType).to(equal(testPrecipType));
expect(testStruct.visibility).to(equal(testVisibility));
- expect(testStruct.weatherIconImageName).to(equal(testWeatherIconImageName));
+ expect(testStruct.weatherIcon).to(equal(testWeatherIcon));
});
it(@"Should get correctly when initialized with a convenience init", ^{
- SDLWeatherData *testStruct = [[SDLWeatherData alloc] initWithCurrentTemperature:testCurrentTemp temperatureHigh:testTempHigh temperatureLow:testTempLow apparentTemperature:testApparentTemp apparentTemperatureHigh:testApparentTempHigh apparentTemperatureLow:testApparentTempLow weatherSummary:testWeatherSummary time:testTime humidity:@(testHumidity) cloudCover:@(testCloudCover) moonPhase:@(testMoonPhase) windBearing:@(testWindBearing) windGust:@(testWindGust) windSpeed:@(testWindSpeed) nearestStormBearing:@(testNearestStormBearing) nearestStormDistance:@(testNearestStormDistance) precipAccumulation:@(testPrecipAccumulation) precipIntensity:@(testPrecipIntensity) precipProbability:@(testPrecipProbability) precipType:testPrecipType visibility:@(testVisibility) weatherIconImageName:testWeatherIconImageName];
+ SDLWeatherData *testStruct = [[SDLWeatherData alloc] initWithCurrentTemperature:testCurrentTemp temperatureHigh:testTempHigh temperatureLow:testTempLow apparentTemperature:testApparentTemp apparentTemperatureHigh:testApparentTempHigh apparentTemperatureLow:testApparentTempLow weatherSummary:testWeatherSummary time:testTime humidity:@(testHumidity) cloudCover:@(testCloudCover) moonPhase:@(testMoonPhase) windBearing:@(testWindBearing) windGust:@(testWindGust) windSpeed:@(testWindSpeed) nearestStormBearing:@(testNearestStormBearing) nearestStormDistance:@(testNearestStormDistance) precipAccumulation:@(testPrecipAccumulation) precipIntensity:@(testPrecipIntensity) precipProbability:@(testPrecipProbability) precipType:testPrecipType visibility:@(testVisibility) weatherIcon:testWeatherIcon];
expect(testStruct.currentTemperature).to(equal(testCurrentTemp));
expect(testStruct.temperatureHigh).to(equal(testTempHigh));
@@ -176,7 +177,7 @@ describe(@"Getter/Setter Tests", ^{
expect(testStruct.precipProbability).to(equal(testPrecipProbability));
expect(testStruct.precipType).to(equal(testPrecipType));
expect(testStruct.visibility).to(equal(testVisibility));
- expect(testStruct.weatherIconImageName).to(equal(testWeatherIconImageName));
+ expect(testStruct.weatherIcon).to(equal(testWeatherIcon));
});
@@ -204,7 +205,7 @@ describe(@"Getter/Setter Tests", ^{
expect(testStruct.precipProbability).to(beNil());
expect(testStruct.precipType).to(beNil());
expect(testStruct.visibility).to(beNil());
- expect(testStruct.weatherIconImageName).to(beNil());
+ expect(testStruct.weatherIcon).to(beNil());
});
});