@@ -13,6 +13,7 @@ - (NSString *)standardizeValue:(id)value forEvent:(BOOL)forEvent;
13
13
- (NSString *)getEventNameForCommerceEvent : (MPCommerceEvent *)commerceEvent parameters : (NSDictionary <NSString *, id> *)parameters ;
14
14
- (NSDictionary <NSString *, id> *)getParameterForCommerceEvent : (MPCommerceEvent *)commerceEvent ;
15
15
- (NSMutableDictionary <NSString *, id> *)getParametersForScreen : (MPEvent *)screenEvent ;
16
+ - (NSMutableArray *)getParametersForProducts : (id )products ;
16
17
@end
17
18
18
19
@interface mParticle_Firebase_AnalyticsTests : XCTestCase
@@ -298,6 +299,7 @@ - (void)testProductParameters {
298
299
NSMutableDictionary <NSString *, id > *testProductCustomAttributes = [[@{@" productCustomAttribute" : @" potato" , @" store" : @" Target" } mutableCopy] mutableCopy ];
299
300
product.brand = @" LV" ;
300
301
product.category = @" vegetable" ;
302
+ product.position = 4 ;
301
303
product.userDefinedAttributes = testProductCustomAttributes;
302
304
303
305
MPCommerceEvent *event = [[MPCommerceEvent alloc ] initWithImpressionName: @" suggested products list" product: product];
@@ -306,8 +308,8 @@ - (void)testProductParameters {
306
308
NSArray *itemsArray = [exampleKit getParametersForProducts: impressionProducts];
307
309
id item = itemsArray[0 ];
308
310
309
- // The item inside itemsArray should include 8 parameters in total including the 2 product custom attributes
310
- XCTAssertEqual ([item count ], 8 );
311
+ // The item inside itemsArray should include 9 parameters in total including the 2 product custom attributes
312
+ XCTAssertEqual ([item count ], 9 );
311
313
}
312
314
313
315
- (void )testCommerceEventCheckoutOptions {
0 commit comments