Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-li committed Feb 21, 2024
1 parent 194832e commit 78158a4
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
* THE SOFTWARE.
*/
// TODO: Commented out 🧪
// #import <pthread.h>
// #import <mach/mach.h>
// #import <objc/runtime.h>
// #import <XCTest/XCTest.h>
// #import <CoreLocation/CoreLocation.h>
// #import <UIKit/UIKit.h>
// #import <CoreData/CoreData.h>
// #import <UserNotifications/UserNotifications.h>
#import <pthread.h>
#import <mach/mach.h>
#import <objc/runtime.h>
#import <XCTest/XCTest.h>
#import <CoreLocation/CoreLocation.h>
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
#import <UserNotifications/UserNotifications.h>
// #import "UncaughtExceptionHandler.h"
// #import "OneSignal.h"
// #import "OneSignalTracker.h"
Expand Down Expand Up @@ -89,15 +89,15 @@
// + (NSString*)downloadMediaAndSaveInBundle:(NSString*)urlString;
// @end

// @interface UnitTests : XCTestCase
@interface UnitTests : XCTestCase

// @property NSError* CALLBACK_EXTERNAL_USER_ID_FAIL_RESPONSE;
// @property NSString* CALLBACK_EXTERNAL_USER_ID;
// @property NSString* CALLBACK_EMAIL_EXTERNAL_USER_ID;
@property NSError* CALLBACK_EXTERNAL_USER_ID_FAIL_RESPONSE;
@property NSString* CALLBACK_EXTERNAL_USER_ID;
@property NSString* CALLBACK_EMAIL_EXTERNAL_USER_ID;

// @end
@end

// @implementation UnitTests
@implementation UnitTests

// /*
// Put setup code here
Expand Down Expand Up @@ -3241,20 +3241,20 @@
// }
// }

// - (void)testNotificationJson {
// NSDictionary *aps = @{
// @"aps": @{
// @"content-available": @1,
// @"mutable-content": @1,
// @"alert": @"Message Body",
// @"relevance-score": @0.15,
// @"interruption-level": @"time-sensitive",
// },
// @"os_data": @{
// @"i": @"notif id",
// @"ti": @"templateId123",
// @"tn": @"Template name"
// }};
- (void)testNotificationJson {
NSDictionary *aps = @{
@"aps": @{
@"content-available": @1,
@"mutable-content": @1,
@"alert": @"Message Body",
@"relevance-score": @0.15,
@"interruption-level": @"time-sensitive",
},
@"os_data": @{
@"i": @"notif id",
@"ti": @"templateId123",
@"tn": @"Template name"
}};
// OSNotification *notification = [OSNotification parseWithApns:aps];
// NSDictionary *json = [notification jsonRepresentation];
// XCTAssertEqualObjects(json[@"notificationId"], @"notif id");
Expand All @@ -3263,7 +3263,7 @@
// XCTAssertEqualObjects(json[@"body"], @"Message Body");
// XCTAssertEqualObjects(json[@"templateId"], @"templateId123");
// XCTAssertEqualObjects(json[@"templateName"], @"Template name");
// }
}

// - (void)testInAppMessageInternalJson {
// NSDictionary *messageJson = @{
Expand Down Expand Up @@ -3597,4 +3597,4 @@
// }


// @end
@end

0 comments on commit 78158a4

Please sign in to comment.