@@ -72,8 +72,8 @@ class AlertStoreTests: XCTestCase {
72
72
let object = StoredAlert ( from: alert2, context: alertStore. managedObjectContext, issuedDate: Self . historicDate)
73
73
XCTAssertNil ( object. acknowledgedDate)
74
74
XCTAssertNil ( object. retractedDate)
75
- XCTAssertEqual ( " { \" title \" : \" title \" , \" acknowledgeActionButtonLabel \" : \" label \" , \" body \" : \" body \" } " , object. backgroundContent)
76
- XCTAssertEqual ( " { \" title \" : \" title \" , \" acknowledgeActionButtonLabel \" : \" label \" , \" body \" : \" body \" } " , object. foregroundContent)
75
+ XCTAssertEqual ( " { \" acknowledgeActionButtonLabel \" : \" label \" , \" body \" : \" body \" , \" title \" : \" title \" } " , object. backgroundContent)
76
+ XCTAssertEqual ( " { \" acknowledgeActionButtonLabel \" : \" label \" , \" body \" : \" body \" , \" title \" : \" title \" } " , object. foregroundContent)
77
77
XCTAssertEqual ( " managerIdentifier2.alertIdentifier2 " , object. identifier. value)
78
78
XCTAssertEqual ( Self . historicDate, object. issuedDate)
79
79
XCTAssertEqual ( 1 , object. modificationCounter)
@@ -870,14 +870,14 @@ class AlertStoreLogCriticalEventLogTests: XCTestCase {
870
870
endDate: dateFormatter. date ( from: " 2100-01-02T03:09:00Z " ) !,
871
871
to: outputStream,
872
872
progress: progress) )
873
- XCTAssertEqual ( outputStream . string , """
874
- [
875
- { " acknowledgedDate " : " 2100-01-02T03:08:00.000Z " , " alertIdentifier " : " a1 " , " backgroundContent " : " { \\ \" title \\ \" : \\ \" BACKGROUND \\ \" , \\ \" acknowledgeActionButtonLabel \\ \" : \\ \" OK \\ \" , \\ \" body \\ \" : \\ \" background \\ \" } " , " interruptionLevel " : " timeSensitive " , " issuedDate " : " 2100-01-02T03:08:00.000Z " , " managerIdentifier " : " m1 " , " modificationCounter " :1, " syncIdentifier " : " 52A046F7-F449-49B2-B003-7A378D0002DE " , " triggerType " :0},
876
- { " acknowledgedDate " : " 2100-01-02T03:04 :00.000Z " , " alertIdentifier " : " a3 " , " backgroundContent " : " { \\ \" title \\ \ ": \\ \" BACKGROUND \\ \ ", \\ \" acknowledgeActionButtonLabel \\ \ ": \\ \" OK \\ \ ", \\ \" body \\ \ ": \\ \" background \\ \ "} " , " interruptionLevel " : " timeSensitive " , " issuedDate " : " 2100-01-02T03:04 :00.000Z " , " managerIdentifier " : " m3 " , " modificationCounter " :3 , " syncIdentifier " : " 285AEA4B-0DEE-41F4-8669-800E9582A6E7 " , " triggerType " :0},
877
- { " acknowledgedDate " : " 2100-01-02T03:06 :00.000Z " , " alertIdentifier " : " a4 " , " backgroundContent " : " { \\ \" title \\ \ ": \\ \" BACKGROUND \\ \ ", \\ \" acknowledgeActionButtonLabel \\ \ ": \\ \" OK \\ \ ", \\ \" body \\ \ ": \\ \" background \\ \ "} " , " interruptionLevel " : " timeSensitive " , " issuedDate " : " 2100-01-02T03:06 :00.000Z " , " managerIdentifier " : " m4 " , " modificationCounter " :4 , " syncIdentifier " : " 4B3109BD-DE11-42BD-A777-D4783459C483 " , " triggerType " :0}
878
- ]
879
- """
880
- )
873
+
874
+ XCTAssertEqual ( outputStream . string , #"""
875
+ [
876
+ {"acknowledgedDate":"2100-01-02T03:08 :00.000Z","alertIdentifier":"a1 ","backgroundContent":"{\"acknowledgeActionButtonLabel\ ":\"OK\ ",\"body\ ":\"background\ ",\"title\ ":\"BACKGROUND\ "}","interruptionLevel":"timeSensitive","issuedDate":"2100-01-02T03:08 :00.000Z","managerIdentifier":"m1 ","modificationCounter":1 ,"syncIdentifier":"52A046F7-F449-49B2-B003-7A378D0002DE ","triggerType":0},
877
+ {"acknowledgedDate":"2100-01-02T03:04 :00.000Z","alertIdentifier":"a3 ","backgroundContent":"{\"acknowledgeActionButtonLabel\ ":\"OK\ ",\"body\ ":\"background\ ",\"title\ ":\"BACKGROUND\ "}","interruptionLevel":"timeSensitive","issuedDate":"2100-01-02T03:04 :00.000Z","managerIdentifier":"m3 ","modificationCounter":3 ,"syncIdentifier":"285AEA4B-0DEE-41F4-8669-800E9582A6E7 ","triggerType":0},
878
+ {"acknowledgedDate":"2100-01-02T03:06:00.000Z","alertIdentifier":"a4","backgroundContent":"{\"acknowledgeActionButtonLabel\":\"OK\",\"body\":\"background\",\"title\":\"BACKGROUND\"}","interruptionLevel":"timeSensitive","issuedDate":"2100-01-02T03:06:00.000Z","managerIdentifier":"m4","modificationCounter":4,"syncIdentifier":"4B3109BD-DE11-42BD-A777-D4783459C483","triggerType":0}
879
+ ]
880
+ """# )
881
881
XCTAssertEqual ( progress. completedUnitCount, 3 * 1 )
882
882
}
883
883
0 commit comments