Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 616d17f

Browse files
committed
Re-organizing test methods
1 parent 9248fa7 commit 616d17f

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

ios/CodePush/CodePush.m

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,23 @@ + (NSString *)getApplicationSupportDirectory
130130
return applicationSupportDirectory;
131131
}
132132

133+
+ (void)setDeploymentKey:(NSString *)deploymentKey
134+
{
135+
[CodePushConfig current].deploymentKey = deploymentKey;
136+
}
137+
138+
#pragma mark - Test-only methods
139+
140+
/*
141+
* WARNING: This cleans up all downloaded and pending updates.
142+
*/
143+
+ (void)clearUpdates
144+
{
145+
[CodePushPackage clearUpdates];
146+
[self removePendingUpdate];
147+
[self removeFailedUpdates];
148+
}
149+
133150
/*
134151
* This returns a boolean value indicating whether CodePush has
135152
* been set to run under a test configuration.
@@ -139,11 +156,6 @@ + (BOOL)isUsingTestConfiguration
139156
return testConfigurationFlag;
140157
}
141158

142-
+ (void)setDeploymentKey:(NSString *)deploymentKey
143-
{
144-
[CodePushConfig current].deploymentKey = deploymentKey;
145-
}
146-
147159
/*
148160
* This is used to enable an environment in which tests can be run.
149161
* Specifically, it flips a boolean flag that causes bundles to be
@@ -155,16 +167,6 @@ + (void)setUsingTestConfiguration:(BOOL)shouldUseTestConfiguration
155167
testConfigurationFlag = shouldUseTestConfiguration;
156168
}
157169

158-
/*
159-
* WARNING: This cleans up all downloaded and pending updates.
160-
*/
161-
+ (void)clearUpdates
162-
{
163-
[CodePushPackage clearUpdates];
164-
[self removePendingUpdate];
165-
[self removeFailedUpdates];
166-
}
167-
168170
#pragma mark - Private API methods
169171

170172
@synthesize bridge = _bridge;

0 commit comments

Comments
 (0)