/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/ |
D | AttributeSetBuilderTest.java | 29 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeResourceValue_shouldReturnTheResourceValue() 39 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeResourceValueWithLeadingWhitespace_shouldReturnTheResourceValue() 49 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getSystemAttributeResourceValue_shouldReturnDefaultValueForNullResourceId() 59 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getSystemAttributeResourceValue_shouldReturnDefaultValueForNonMatchingNamespaceId() 69 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in shouldCopeWithDefiningLocalIds() 79 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeResourceValue_withNamespace_shouldReturnTheResourceValue() 89 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeResourceValue_shouldReturnDefaultValueWhenAttributeIsNull() 99 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeResourceValue_shouldReturnDefaultValueWhenNotInAttributeSet() 108 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeBooleanValue_shouldGetBooleanValuesFromAttributes() 119 AttributeSet roboAttributeSet = Robolectric.buildAttributeSet() in getAttributeBooleanValue_withNamespace_shouldGetBooleanValuesFromAttributes() [all …]
|
D | RobolectricTest.java | 71 assertThat(Robolectric.getBackgroundThreadScheduler().isPaused()).isFalse(); in shouldResetBackgroundSchedulerBeforeTests() 72 Robolectric.getBackgroundThreadScheduler().pause(); in shouldResetBackgroundSchedulerBeforeTests() 77 assertThat(Robolectric.getBackgroundThreadScheduler().isPaused()).isFalse(); in shouldResetBackgroundSchedulerAfterTests() 78 Robolectric.getBackgroundThreadScheduler().pause(); in shouldResetBackgroundSchedulerAfterTests() 118 LifeCycleActivity activity = Robolectric.setupActivity(LifeCycleActivity.class); in setupActivity_returnsAVisibleActivity()
|
/external/robolectric-shadows/shadows/supportv4/src/test/java/org/robolectric/shadows/support/v4/ |
D | ShadowAsyncTaskLoaderTest.java | 11 import org.robolectric.Robolectric; 21 Robolectric.getForegroundThreadScheduler().pause(); in setUp() 22 Robolectric.getBackgroundThreadScheduler().pause(); in setUp() 30 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_shouldEnqueueWorkOnSchedulers() 34 Robolectric.flushForegroundThreadScheduler(); in forceLoad_shouldEnqueueWorkOnSchedulers() 44 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_multipleLoads() 48 Robolectric.flushForegroundThreadScheduler(); in forceLoad_multipleLoads() 55 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_multipleLoads() 59 Robolectric.flushForegroundThreadScheduler(); in forceLoad_multipleLoads()
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowAsyncTaskLoaderTest.java | 13 import org.robolectric.Robolectric; 21 Robolectric.getForegroundThreadScheduler().pause(); in setUp() 22 Robolectric.getBackgroundThreadScheduler().pause(); in setUp() 30 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_shouldEnqueueWorkOnSchedulers() 34 Robolectric.flushForegroundThreadScheduler(); in forceLoad_shouldEnqueueWorkOnSchedulers() 44 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_multipleLoads() 48 Robolectric.flushForegroundThreadScheduler(); in forceLoad_multipleLoads() 55 Robolectric.flushBackgroundThreadScheduler(); in forceLoad_multipleLoads() 59 Robolectric.flushForegroundThreadScheduler(); in forceLoad_multipleLoads()
|
D | ShadowActivityTest.java | 17 import static org.robolectric.Robolectric.buildActivity; 18 import static org.robolectric.Robolectric.setupActivity; 61 import org.robolectric.Robolectric; 73 activity = Robolectric.setupActivity(LabelTestActivity1.class); in shouldUseApplicationLabelFromManifestAsTitleForActivity() 80 activity = Robolectric.setupActivity(LabelTestActivity2.class); in shouldUseActivityLabelFromManifestAsTitleForActivity() 87 activity = Robolectric.setupActivity(LabelTestActivity3.class); in shouldUseActivityLabelFromManifestAsTitleForActivityWithShortName() 94 ActivityController<Activity> controller = Robolectric.buildActivity(Activity.class); in createActivity_noDisplayFinished_shouldFinishActivity() 108 ActivityController<Activity> controller = Robolectric.buildActivity(Activity.class); in createActivity_noDisplayNotFinished_shouldThrowIllegalStateException() 126 …ActivityController<DialogCreatingActivity> controller = Robolectric.buildActivity(DialogCreatingAc… in shouldNotComplainIfActivityIsDestroyedWhileAnotherActivityHasRegisteredBroadcastReceivers() 129 DialogLifeCycleActivity activity2 = Robolectric.setupActivity(DialogLifeCycleActivity.class); in shouldNotComplainIfActivityIsDestroyedWhileAnotherActivityHasRegisteredBroadcastReceivers() [all …]
|
D | ShadowSystemClockTest.java | 15 import org.robolectric.Robolectric; 24 Robolectric.getForegroundThreadScheduler().advanceTo(1000); in shouldAllowForFakingOfTime() 30 Robolectric.getForegroundThreadScheduler().advanceTo(1000); in sleep() 37 Robolectric.getForegroundThreadScheduler().advanceTo(1000); in testSetCurrentTime() 47 Robolectric.getForegroundThreadScheduler().advanceTo(1000); in testElapsedRealtime() 49 Robolectric.getForegroundThreadScheduler().advanceTo(1034); in testElapsedRealtime() 55 Robolectric.getForegroundThreadScheduler().advanceTo(1000); in testElapsedRealtimeNanos() 57 Robolectric.getForegroundThreadScheduler().advanceTo(1034); in testElapsedRealtimeNanos()
|
D | ShadowTypedArrayTest.java | 15 import org.robolectric.Robolectric; 45 Robolectric.buildAttributeSet() in getInt_withFlags_shouldReturnValue() 60 Robolectric.buildAttributeSet() in getResourceId_shouldReturnActualValue() 76 Robolectric.buildAttributeSet() in getFraction_shouldReturnGivenValue() 92 Robolectric.buildAttributeSet() in getDimension_shouldReturnGivenValue() 102 Robolectric.buildAttributeSet() in getDrawable_withExplicitColorValue_shouldReturnColorDrawable() 113 Robolectric.buildAttributeSet() in getTextArray_whenNoSuchAttribute_shouldReturnNull() 127 Robolectric.buildAttributeSet() in getTextArray_shouldReturnValues() 136 Robolectric.buildAttributeSet() in hasValue_withValue() 152 Robolectric.buildAttributeSet() in hasValue_withNullValue() [all …]
|
D | ShadowNfcAdapterTest.java | 19 import org.robolectric.Robolectric; 35 final Activity activity = Robolectric.setupActivity(Activity.class); in setNdefPushMesageCallback_shouldUseCallback() 46 final Activity activity = Robolectric.setupActivity(Activity.class); in setOnNdefPushCompleteCallback_shouldUseCallback() 57 final Activity activity = Robolectric.setupActivity(Activity.class); in setOnNdefPushCompleteCallback_throwsOnNullActivity() 70 final Activity activity = Robolectric.setupActivity(Activity.class); in setOnNdefPushCompleteCallback_throwsOnNullInActivities() 114 final Activity activity = Robolectric.setupActivity(Activity.class); in setNdefPushMessage_setsNullMessage() 124 final Activity activity = Robolectric.setupActivity(Activity.class); in setNdefPushMessage_setsNonNullMessage() 136 final Activity activity = Robolectric.setupActivity(Activity.class); in getNdefPushMessage_messageNotSet_throwsIllegalStateException()
|
D | ShadowAnimationUtilsTest.java | 12 import org.robolectric.Robolectric; 20 …assertThat(AnimationUtils.loadAnimation(Robolectric.setupActivity(Activity.class), R.anim.fade_in)… in loadAnimation_shouldCreateAnimation() 25 …assertThat(AnimationUtils.loadLayoutAnimation(Robolectric.setupActivity(Activity.class), 1)).isNot… in loadLayoutAnimation_shouldCreateAnimation() 30 …final LayoutAnimationController anim = AnimationUtils.loadLayoutAnimation(Robolectric.setupActivit… in getLoadedFromResourceId_forAnimationController_shouldReturnAnimationResourceId()
|
D | ShadowWindowTest.java | 20 import org.robolectric.Robolectric; 28 Activity activity = Robolectric.buildActivity(Activity.class).create().get(); in getFlag_shouldReturnWindowFlags() 40 Activity activity = Robolectric.buildActivity(Activity.class).create().get(); in getTitle_shouldReturnWindowTitle() 48 Activity activity = Robolectric.buildActivity(Activity.class).create().get(); in getBackgroundDrawable_returnsSetDrawable() 60 TestActivity activity = Robolectric.buildActivity(TestActivity.class).create().get(); in getSoftInputMode_returnsSoftInputMode() 71 Activity activity = Robolectric.buildActivity(TestActivity.class).create().get(); in getProgressBar_returnsTheProgressBar() 84 …ActivityController<TestActivity> testActivityActivityController = Robolectric.buildActivity(TestAc… in getIndeterminateProgressBar_returnsTheIndeterminateProgressBar()
|
D | ShadowRenderNodeAnimatorTest.java | 16 import org.robolectric.Robolectric; 28 activity = Robolectric.setupActivity(Activity.class); in setUp() 49 Robolectric.getForegroundThreadScheduler().pause(); in canceled() 112 Robolectric.getForegroundThreadScheduler().pause(); in doubleCanceled() 127 Robolectric.getForegroundThreadScheduler().pause(); in doubleEnded() 142 Robolectric.getForegroundThreadScheduler().pause(); in delayedAndCanceled()
|
D | ShadowAsyncTaskTest.java | 18 import org.robolectric.Robolectric; 28 Robolectric.getBackgroundThreadScheduler().pause(); in setUp() 29 Robolectric.getForegroundThreadScheduler().pause(); in setUp() 118 Robolectric.getBackgroundThreadScheduler().unPause(); in executeReturnsAsyncTask() 129 Robolectric.getBackgroundThreadScheduler().unPause(); in shouldGetStatusForAsyncTask() 135 Robolectric.getBackgroundThreadScheduler().unPause(); in onPostExecute_doesNotSwallowExceptions() 136 Robolectric.getForegroundThreadScheduler().unPause(); in onPostExecute_doesNotSwallowExceptions()
|
D | ShadowWindowManagerGlobalUnitTest.java | 10 import org.robolectric.Robolectric; 26 Robolectric.setupActivity(Activity.class); in first() 32 Robolectric.setupActivity(Activity.class); in second()
|
D | ShadowBackupManagerTest.java | 27 import org.robolectric.Robolectric; 94 Robolectric.flushForegroundThreadScheduler(); in getAvailableRestoreSets_shouldCallbackToRestoreSetsAvailable() 112 Robolectric.flushForegroundThreadScheduler(); in restoreAll_shouldRestoreData() 129 Robolectric.flushForegroundThreadScheduler(); in restoreSome_shouldRestoreSpecifiedPackages() 144 Robolectric.flushForegroundThreadScheduler(); in restorePackage_shouldRestoreSpecifiedPackage() 151 Robolectric.flushForegroundThreadScheduler(); in restorePackage_shouldRestoreSpecifiedPackage()
|
D | ShadowTabActivityTest.java | 12 import org.robolectric.Robolectric; 19 TabActivity activity = Robolectric.buildActivity(TabActivity.class).create().get(); in tabActivityShouldNotMakeNewTabHostEveryGet() 28 TabActivity activity = Robolectric.buildActivity(TabActivity.class).create().get(); in shouldGetTabWidget()
|
D | ShadowTextToSpeechTest.java | 19 import org.robolectric.Robolectric; 31 activity = Robolectric.buildActivity(Activity.class).create().get(); in setUp() 118 Robolectric.flushForegroundThreadScheduler(); in threeArgumentSpeak_withUtteranceId_shouldGetCallbackUtteranceId() 129 Robolectric.flushForegroundThreadScheduler(); in threeArgumentSpeak_withoutUtteranceId_shouldDoesNotGetCallback() 148 Robolectric.flushForegroundThreadScheduler(); in onUtteranceProgressListener_shouldGetCallbackUtteranceId()
|
D | ShadowAssetManagerTest.java | 27 import org.robolectric.Robolectric; 135 Robolectric.buildAttributeSet().addAttribute(R.attr.multiformat, "16").build(); in multiFormatAttributes_integerDecimalValue() 147 Robolectric.buildAttributeSet().addAttribute(R.attr.multiformat, "0x10").build(); in multiFormatAttributes_integerHexValue() 159 Robolectric.buildAttributeSet().addAttribute(R.attr.multiformat, "Hello World").build(); in multiFormatAttributes_stringValue() 171 Robolectric.buildAttributeSet().addAttribute(R.attr.multiformat, "true").build(); in multiFormatAttributes_booleanValue() 207 Robolectric.buildAttributeSet() in whenStyleAttrResolutionFails_attrsToTypedArray_returnsNiceErrorMessage()
|
D | ShadowPreferenceActivityTest.java | 12 import org.robolectric.Robolectric; 21 activity = Robolectric.buildActivity(TestPreferenceActivity.class).create().get(); in setUp() 31 TestPreferenceActivity activity = Robolectric.buildActivity(TestPreferenceActivity.class).get(); in shouldNotInitializePreferenceScreen()
|
/external/dagger2/javatests/dagger/android/ |
D | DispatchingAndroidInjectorTest.java | 30 import org.robolectric.Robolectric; 41 FooActivity activity = Robolectric.setupActivity(FooActivity.class); in withClassKeys() 52 FooActivity activity = Robolectric.setupActivity(FooActivity.class); in withStringKeys() 63 FooActivity fooActivity = Robolectric.setupActivity(FooActivity.class); in withMixedKeys() 65 BarActivity barActivity = Robolectric.setupActivity(BarActivity.class); in withMixedKeys() 74 BarActivity activity = Robolectric.setupActivity(BarActivity.class); in maybeInject_returnsFalse_ifNoMatchingInjectorExists() 83 FooActivity activity = Robolectric.setupActivity(FooActivity.class); in throwsIfFactoryCreateReturnsNull() 97 FooActivity activity = Robolectric.setupActivity(FooActivity.class); in throwsIfClassMismatched()
|
D | AndroidInjectionTest.java | 28 import org.robolectric.Robolectric; 62 Activity activity = Robolectric.setupActivity(Activity.class); 81 ActivityInjectsFragment activity = Robolectric.setupActivity(ActivityInjectsFragment.class); 101 ActivityInjectsFragment activity = Robolectric.setupActivity(ActivityInjectsFragment.class); 118 Activity activity = Robolectric.setupActivity(Activity.class); 153 Activity activity = Robolectric.setupActivity(Activity.class);
|
/external/robolectric-shadows/ |
D | README.md | 6 Robolectric is the industry-standard unit testing framework for Android. With Robolectric, your tes… 10 Here's an example of a simple test written using Robolectric: 18 Activity activity = Robolectric.setupActivity(MyActivity.class); 29 For more information about how to install and use Robolectric on your project, extend its functiona… 35 …Robolectric tests you can refer to `deckard` (for either [maven](http://github.com/robolectric/dec… 45 Robolectric is built using Gradle. Both IntelliJ and Android Studio can import the top-level `build… 47 …DK available in your local Maven artifact repository in order to build Robolectric. Copy all requi… 53 Robolectric supports running tests against multiple Android API levels. The work it must do to supp…
|
/external/dagger2/javatests/dagger/android/support/functional/ |
D | InjectorsTest.java | 27 import org.robolectric.Robolectric; 46 activityController = Robolectric.buildActivity(TestActivity.class); in setUp() 58 service = Robolectric.buildService(TestService.class).create().get(); in setUp() 59 intentService = Robolectric.buildIntentService(TestIntentService.class).create().get(); in setUp() 64 contentProvider = Robolectric.setupContentProvider(TestContentProvider.class); in setUp() 125 Robolectric.setupActivity(OuterClass.TestInnerClassActivity.class); in componentStructureFollowsControllerStructure() 183 Robolectric.setupActivity(OuterClass.TestInnerClassActivity.class); in allControllersAreDirectChildrenOfApplication() 233 Robolectric.setupActivity(TestActivityWithScope.class); in usesGeneratedModules() 238 Robolectric.setupActivity(OuterClass.TestInnerClassActivity.class); in usesGeneratedModules()
|
/external/robolectric-shadows/processor/ |
D | README.md | 1 # Robolectric Annotation Processor (RAP) 3 Welcome to the Robolectric Annotation Processor project. 5 ## What is the Robolectric Annotation Processor? 7 …Robolectric Annotation Processor (RAP) is an annotation processor that uses Java's built-in annota… 10 2. It enforces at compile-time some constraints that are implied by Robolectric annotations, to hel… 17 Robolectric has a large amount of boilerplate code in the form of the <code>shadowOf()</code> metho… 21 There are a number of usages and constraints implicit in Robolectric's annotation model which if vi… 51 There are likely other opportunities for this sort of optimization in Robolectric using RAP, which … 55 …ose contributing to Robolectric itself. Those who wish to do so will simply need to check out the … 57 …bal <code>reset()</code> methods) could also be of benefit to users of Robolectric who are develop… [all …]
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/controller/ |
D | ActivityControllerTest.java | 28 import org.robolectric.Robolectric; 39 …private final ActivityController<MyActivity> controller = Robolectric.buildActivity(MyActivity.cla… 48 Activity activity = Robolectric.setupActivity(Activity.class); in canCreateActivityNotListedInManifest() 67 final Scheduler s = Robolectric.getForegroundThreadScheduler(); in pendingTasks_areRunEagerly_whenActivityIsStarted_andSchedulerUnPaused() 69 TestDelayedPostActivity activity = Robolectric.setupActivity(TestDelayedPostActivity.class); in pendingTasks_areRunEagerly_whenActivityIsStarted_andSchedulerUnPaused() 77 final Scheduler s = Robolectric.getForegroundThreadScheduler(); in delayedTasks_areNotRunEagerly_whenActivityIsStarted_andSchedulerUnPaused() 79 TestDelayedPostActivity activity = Robolectric.setupActivity(TestDelayedPostActivity.class); in delayedTasks_areNotRunEagerly_whenActivityIsStarted_andSchedulerUnPaused() 96 …MyActivity myActivity = Robolectric.buildActivity(MyActivity.class, new Intent(Intent.ACTION_VIEW)… in shouldSetIntentComponentWithCustomIntentWithoutComponentSet() 219 MyActivity activity = Robolectric.buildActivity(MyActivity.class).create().get(); in attach_shouldWorkWithAPI19() 245 Robolectric.buildActivity(ConfigAwareActivity.class).setup(); in configurationChange_callsOnConfigurationChangedAndAppliesConfigWhenAllManaged() [all …]
|
/external/robolectric-shadows/shadows/supportv4/src/main/java/org/robolectric/shadows/support/v4/ |
D | ShadowAsyncTaskLoader.java | 8 import org.robolectric.Robolectric; 29 Robolectric.getForegroundThreadScheduler().post(new Runnable() { in onForceLoad() 41 Robolectric.getBackgroundThreadScheduler().post(future); in onForceLoad()
|