@Before public void setup() { fragment = ClubsFragment.newInstance(); ((TestApplicationComponent) RacquetApplication.getApplication().getApplicationComponent()) .inject(this); RacquetApplication.getApplication().getApplicationComponent().inject(fragment); mockRestService = (MockRacquetRestService) restService; }
@Before public void setup() { ((TestApplicationComponent) RacquetApplication.getApplication().getApplicationComponent()) .inject(this); List<Match> matches = ModelBuilder.getMatches(5, "player1", "player2"); adapter = new MatchesAdapter(matches); }
@Before public void setup() { ((TestApplicationComponent) RacquetApplication.getApplication().getApplicationComponent()) .inject(this); Club club = ModelBuilder.getClub(1, "My Club"); Intent intent = ClubActivity.getIntent(RuntimeEnvironment.application, club); ActivityController<ClubActivity> activityController = ActivityController.of(Robolectric.getShadowsAdapter(), ClubActivity.class); activity = activityController.withIntent(intent).setup().get(); }
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); RacquetApplication.getApplication().getApplicationComponent().inject(this); }