File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
android-sdk/src/androidTest/java/com/optimizely/ab/android/sdk
event-handler/src/test/java/com/optimizely/ab/android/event_handler
user-experiment-record/src/androidTest/java/com/optimizely/user_experiment_record Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .optimizely .ab .android .sdk ;
17
17
18
+ import android .annotation .TargetApi ;
18
19
import android .content .Context ;
19
20
import android .content .Intent ;
21
+ import android .os .Build ;
20
22
import android .support .test .InstrumentationRegistry ;
21
23
22
24
import com .optimizely .ab .android .shared .Cache ;
@@ -72,6 +74,7 @@ public void receivedActionBootCompleted() {
72
74
verify (logger ).info ("Received intent with action {}" , Intent .ACTION_BOOT_COMPLETED );
73
75
}
74
76
77
+ @ TargetApi (Build .VERSION_CODES .HONEYCOMB_MR1 )
75
78
@ Test
76
79
public void receivedActionMyPackageReplaced () {
77
80
Context context = InstrumentationRegistry .getTargetContext ();
Original file line number Diff line number Diff line change 17
17
18
18
import android .content .Context ;
19
19
import android .content .Intent ;
20
+ import android .os .Build ;
21
+ import android .support .annotation .RequiresApi ;
20
22
21
23
import org .junit .Before ;
22
24
import org .junit .Test ;
@@ -75,6 +77,7 @@ public void onReceiveValidBootComplete() {
75
77
verify (logger ).info ("Rescheduling event flushing if necessary" );
76
78
}
77
79
80
+ @ RequiresApi (api = Build .VERSION_CODES .HONEYCOMB_MR1 )
78
81
@ Test
79
82
public void onReceiveValidPackageReplaced () {
80
83
when (intent .getAction ()).thenReturn (Intent .ACTION_MY_PACKAGE_REPLACED );
Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .optimizely .user_experiment_record ;
17
17
18
+ import android .os .Build ;
19
+ import android .support .annotation .RequiresApi ;
18
20
import android .support .test .InstrumentationRegistry ;
19
21
import android .support .test .espresso .core .deps .guava .util .concurrent .ListeningExecutorService ;
20
22
import android .support .test .espresso .core .deps .guava .util .concurrent .MoreExecutors ;
48
50
* Tests for {@link AndroidUserExperimentRecord}
49
51
*/
50
52
@ RunWith (AndroidJUnit4 .class )
53
+ @ RequiresApi (Build .VERSION_CODES .HONEYCOMB )
51
54
public class AndroidUserExperimentRecordTest {
52
55
53
56
private AndroidUserExperimentRecord androidUserExperimentRecord ;
You can’t perform that action at this time.
0 commit comments