OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:ShadowApplication
(Results
1 - 13
of
13
) sorted by null
/external/robolectric/src/main/java/com/xtremelabs/robolectric/internal/
AppSingletonizer.java
5
import com.xtremelabs.robolectric.shadows.
ShadowApplication
;
19
ShadowApplication
shadowApplication
= (
ShadowApplication
) shadowOf(applicationContext);
20
T instance = get(
shadowApplication
);
23
set(
shadowApplication
, instance);
28
protected abstract T get(
ShadowApplication
shadowApplication
);
30
protected abstract void set(
ShadowApplication
shadowApplication
, T instance)
[
all
...]
/external/robolectric/src/test/java/com/xtremelabs/robolectric/
ApplicationResolverTest.java
4
import com.xtremelabs.robolectric.shadows.
ShadowApplication
;
50
List<
ShadowApplication
.Wrapper> receivers = shadowOf(application).getRegisteredReceivers();
/external/robolectric/src/main/java/com/xtremelabs/robolectric/
ApplicationResolver.java
8
import com.xtremelabs.robolectric.shadows.
ShadowApplication
;
31
ShadowApplication
shadowApplication
= shadowOf(application);
32
shadowApplication
.setPackageName(packageName);
33
shadowApplication
.setApplicationName(applicationName);
35
shadowApplication
.setPackageManager(new RobolectricPackageManager(application, config));
36
registerBroadcastReceivers(
shadowApplication
);
41
private void registerBroadcastReceivers(
ShadowApplication
shadowApplication
) {
48
shadowApplication
.registerReceiver((BroadcastReceiver) Robolectric.newInstanceOf(receiverClassName), filter)
[
all
...]
RobolectricTestRunner.java
36
import com.xtremelabs.robolectric.shadows.
ShadowApplication
;
405
Robolectric.application =
ShadowApplication
.bind(createApplication(), resourceLoader);
Robolectric.java
142
ShadowApplication
.class,
446
public static
ShadowApplication
shadowOf(Application instance) {
447
return (
ShadowApplication
) shadowOf_(instance);
[
all
...]
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
ShadowPreferenceManager.java
21
ShadowApplication
shadowApplication
= shadowOf((Application) context.getApplicationContext());
22
return new TestSharedPreferences(
shadowApplication
.getSharedPreferenceMap(), "__default__", Context.MODE_PRIVATE);
ShadowLayoutInflater.java
60
@Override protected LayoutInflater get(
ShadowApplication
shadowApplication
) {
61
return
shadowApplication
.getLayoutInflater();
64
@Override protected void set(
ShadowApplication
shadowApplication
, LayoutInflater instance) {
65
shadowApplication
.layoutInflater = instance;
ShadowContextWrapper.java
77
return ((
ShadowApplication
) shadowOf(getApplicationContext())).getBroadcastIntents();
87
return ((
ShadowApplication
) shadowOf(getApplicationContext())).registerReceiverWithContext(receiver, filter, realContextWrapper);
244
private
ShadowApplication
getShadowApplication() {
245
return ((
ShadowApplication
) shadowOf(getApplicationContext()));
ShadowService.java
76
((
ShadowApplication
) shadowOf(getApplicationContext())).assertNoBroadcastListenersRegistered(realService, "Service");
ShadowAppWidgetManager.java
29
protected AppWidgetManager get(
ShadowApplication
shadowApplication
) {
30
return
shadowApplication
.appWidgetManager;
34
protected void set(
ShadowApplication
shadowApplication
, AppWidgetManager instance) {
35
shadowApplication
.appWidgetManager = instance;
ShadowApplication.java
39
public class
ShadowApplication
extends ShadowContextWrapper {
108
ShadowApplication
shadowApplication
= shadowOf(application);
109
if (
shadowApplication
.resourceLoader != null) throw new RuntimeException("ResourceLoader already set!");
110
shadowApplication
.resourceLoader = resourceLoader;
111
shadowApplication
.resources = ShadowResources.bind(new Resources(null, null, null), resourceLoader);
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
ApplicationTest.java
59
Application app1 =
ShadowApplication
.bind(new Application(), resourceLoader1);
64
Application app2 =
ShadowApplication
.bind(new Application(), resourceLoader2);
150
final
ShadowApplication
shadowApplication
= Robolectric.shadowOf(Robolectric.application);
151
shadowApplication
.setComponentNameAndServiceForBindService(expectedComponentName, expectedBinder);
154
assertEquals(1,
shadowApplication
.getUnboundServiceConnections().size());
155
assertEquals(service,
shadowApplication
.getUnboundServiceConnections().get(0));
164
final
ShadowApplication
shadowApplication
= Robolectric.shadowOf(Robolectric.application);
165
shadowApplication
.setComponentNameAndServiceForBindService(expectedComponentName, expectedBinder)
[
all
...]
ViewGroupTest.java
43
ShadowApplication
.bind(context, new ResourceLoader(10, R.class, null, null));
Completed in 85 milliseconds