Skip to content

Commit aa1e699

Browse files
committed
Revert "Merge develop into master (#200)"
This reverts commit f381853.
1 parent f381853 commit aa1e699

File tree

135 files changed

+3065
-4049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3065
-4049
lines changed

.circleci/config.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

Example/Leanplum-SDK.xcodeproj/project.pbxproj

Lines changed: 32 additions & 34 deletions
Large diffs are not rendered by default.

Example/Tests/Classes/LPActionManagerTest.m renamed to Example/Tests/Classes/ActionManagerTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo
4545
- (void)leanplum_application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
4646
@end
4747

48-
@interface LPActionManagerTest : XCTestCase
48+
@interface ActionManagerTest : XCTestCase
4949

5050
@end
5151

52-
@implementation LPActionManagerTest
52+
@implementation ActionManagerTest
5353

5454
+ (void)setUp
5555
{

Example/Tests/Classes/LPAppIconManagerTest.m renamed to Example/Tests/Classes/AppIconManagerTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ + (void)prepareUploadRequestParam:(NSMutableArray *)requestParam
4848

4949
@end
5050

51-
@interface LPAppIconManagerTest : XCTestCase
51+
@interface AppIconManagerTest : XCTestCase
5252

5353
@end
5454

55-
@implementation LPAppIconManagerTest
55+
@implementation AppIconManagerTest
5656

5757
+ (void)setUp
5858
{

Example/Tests/Classes/LPEventCallbackManagerTest.m renamed to Example/Tests/Classes/EventCallbackManagerTest.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
//
88

99
#import <XCTest/XCTest.h>
10-
#import "LPEventCallback.h"
1110
#import "LPEventCallbackManager.h"
1211

13-
@interface LPEventCallbackManagerTest : XCTestCase
12+
@interface EventCallbackManagerTest : XCTestCase
1413

1514
@end
1615

17-
@implementation LPEventCallbackManagerTest
16+
@implementation EventCallbackManagerTest
1817

1918
- (void)setUp {
2019
[super setUp];

Example/Tests/Classes/LPEventDataManagerTest.m renamed to Example/Tests/Classes/EventDataManagerTest.m

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#import <OHHTTPStubs/OHHTTPStubs.h>
2828
#import <OHHTTPStubs/OHPathHelpers.h>
2929
#import "LeanplumHelper.h"
30+
#import "LPRequestStorage.h"
3031
#import "LPEventDataManager.h"
3132
#import "LPDatabase.h"
3233
#import "Constants.h"
@@ -35,6 +36,20 @@
3536
#import "LeanplumReachability+Category.h"
3637
#import "LPJSON.h"
3738

39+
/**
40+
* Expose private class methods
41+
*/
42+
@interface LPRequestStorage(UnitTest)
43+
44+
- (void)migrateRequests;
45+
- (void)saveRequests:(NSMutableArray *)requests;
46+
- (NSMutableArray *)loadRequests;
47+
- (NSString *)cacheFilePath;
48+
- (NSString *)documentsFilePath;
49+
+ (NSString *)itemKeyForIndex:(NSUInteger)index;
50+
51+
@end
52+
3853
@interface LPEventDataManager(UnitTest)
3954

4055
+ (void)migrateRequests;
@@ -48,11 +63,11 @@ + (NSOperationQueue *)sendNowQueue;
4863

4964
@end
5065

51-
@interface LPEventDataManagerTest : XCTestCase
66+
@interface EventDataManagerTest : XCTestCase
5267

5368
@end
5469

55-
@implementation LPEventDataManagerTest
70+
@implementation EventDataManagerTest
5671

5772
- (void)setUp {
5873
[super setUp];
@@ -69,6 +84,22 @@ - (NSDictionary *)sampleData
6984
@"sdkVersion":@"3", @"devMode":@NO, @"time":@"1489007921.162919"};
7085
}
7186

87+
- (void)test_migrateRequests
88+
{
89+
// Clean up.
90+
[[LeanplumRequest sendNowQueue] cancelAllOperations];
91+
[[LeanplumRequest sendNowQueue] waitUntilAllOperationsAreFinished];
92+
93+
[LPEventDataManager deleteEventsWithLimit:10000];
94+
95+
[[LPRequestStorage sharedStorage] popAllRequests];
96+
[[LPRequestStorage sharedStorage] pushRequest:[self sampleData]];
97+
98+
[LPEventDataManager migrateRequests];
99+
NSArray *events = [LPEventDataManager eventsWithLimit:10000];
100+
XCTAssertTrue(events.count == 1);
101+
}
102+
72103
- (void)test_publicEventMethods
73104
{
74105
[LPEventDataManager deleteEventsWithLimit:10000];

Example/Tests/Classes/Extensions/LPVarCache+Extensions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
@interface LPVarCache(UnitTest)
2929

30-
- (void)reset;
30+
+ (void)reset;
3131

32-
- (void)initialize;
32+
+ (void)initialize;
3333

3434
@end

Example/Tests/Classes/LPFileManagerTest.m renamed to Example/Tests/Classes/FileManagerTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
/**
3737
* Tests file manager public methods.
3838
*/
39-
@interface LPFileManagerTest : XCTestCase
39+
@interface FileManagerTest : XCTestCase
4040

4141
@end
4242

43-
@implementation LPFileManagerTest
43+
@implementation FileManagerTest
4444

4545
+ (void)setUp
4646
{

0 commit comments

Comments
 (0)