@@ -287,7 +287,8 @@ - (void)testStringConversion_withAnyNumber_isConvertedToString {
287287 NSDictionary *resultDictionary = [GIDEMMSupport
288288 dictionaryWithStringValuesFromDictionary: inputDictionary];
289289
290- XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]]);
290+ XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]],
291+ @" The value should be an NSString." );
291292 XCTAssertEqualObjects (resultDictionary[@" number_key" ], @" 12345" ,
292293 @" The NSNumber should be converted to a string." );
293294}
@@ -298,7 +299,8 @@ - (void)testStringConversion_withNumberOne_isConvertedToString {
298299 NSDictionary *resultDictionary = [GIDEMMSupport
299300 dictionaryWithStringValuesFromDictionary: inputDictionary];
300301
301- XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]]);
302+ XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]],
303+ @" The value should be an NSString." );
302304 XCTAssertEqualObjects (resultDictionary[@" number_key" ], @" 1" ,
303305 @" The NSNumber should be converted to a string." );
304306}
@@ -309,7 +311,8 @@ - (void)testStringConversion_withNumberZero_isConvertedToString {
309311 NSDictionary *resultDictionary = [GIDEMMSupport
310312 dictionaryWithStringValuesFromDictionary: inputDictionary];
311313
312- XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]]);
314+ XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]],
315+ @" The value should be an NSString." );
313316 XCTAssertEqualObjects (resultDictionary[@" number_key" ], @" 0" ,
314317 @" The NSNumber should be converted to a string." );
315318}
@@ -365,7 +368,6 @@ - (void)testStringConversion_withArray_isConvertedToJSONString {
365368}
366369
367370- (void )testStringConversion_withDictionary_isConvertedToJSONString {
368- NSDictionary *valueAsDictionary = @{ @" nested_key" : @" nested_value" };
369371 NSDictionary *inputDictionary = @{
370372 @" dict_key" : @{
371373 @" nested_key" : @" nested_value"
@@ -392,17 +394,25 @@ - (void)testStringConversion_withMixedTypes_allAreConverted {
392394 NSDictionary *resultDictionary = [GIDEMMSupport
393395 dictionaryWithStringValuesFromDictionary: inputDictionary];
394396
395- XCTAssertTrue ([resultDictionary[@" string_key" ] isKindOfClass: [NSString class ]]);
396- XCTAssertEqualObjects (resultDictionary[@" string_key" ], @" hello" );
397+ XCTAssertTrue ([resultDictionary[@" string_key" ] isKindOfClass: [NSString class ]],
398+ @" The value should be an NSString." );
399+ XCTAssertEqualObjects (resultDictionary[@" string_key" ], @" hello" ,
400+ @" The original string value should be preserved" );
397401
398- XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]]);
399- XCTAssertEqualObjects (resultDictionary[@" number_key" ], @" 987" );
402+ XCTAssertTrue ([resultDictionary[@" number_key" ] isKindOfClass: [NSString class ]],
403+ @" The value should be an NSString." );
404+ XCTAssertEqualObjects (resultDictionary[@" number_key" ], @" 987" ,
405+ @" The NSNumber should be converted to a string." );
400406
401- XCTAssertTrue ([resultDictionary[@" bool_key" ] isKindOfClass: [NSString class ]]);
402- XCTAssertEqualObjects (resultDictionary[@" bool_key" ], @" true" );
407+ XCTAssertTrue ([resultDictionary[@" bool_key" ] isKindOfClass: [NSString class ]],
408+ @" The value should be an NSString." );
409+ XCTAssertEqualObjects (resultDictionary[@" bool_key" ], @" true" ,
410+ @" The boolean YES should be converted to the string 'true'." );
403411
404- XCTAssertTrue ([resultDictionary[@" array_key" ] isKindOfClass: [NSString class ]]);
405- XCTAssertEqualObjects (resultDictionary[@" array_key" ], @" [\" a\" ,false]" );
412+ XCTAssertTrue ([resultDictionary[@" array_key" ] isKindOfClass: [NSString class ]],
413+ @" The value should be an NSString." );
414+ XCTAssertEqualObjects (resultDictionary[@" array_key" ], @" [\" a\" ,false]" ,
415+ @" The array should be serialized into a JSON string." );
406416}
407417
408418- (void )testStringConversion_withEmptyDictionary_returnsEmptyDictionary {
0 commit comments