コード例 #1
0
 @Before
 public void setup() {
   fragment = ClubsFragment.newInstance();
   ((TestApplicationComponent) RacquetApplication.getApplication().getApplicationComponent())
       .inject(this);
   RacquetApplication.getApplication().getApplicationComponent().inject(fragment);
   mockRestService = (MockRacquetRestService) restService;
 }
コード例 #2
0
 @Before
 public void setup() {
   ((TestApplicationComponent) RacquetApplication.getApplication().getApplicationComponent())
       .inject(this);
   List<Match> matches = ModelBuilder.getMatches(5, "player1", "player2");
   adapter = new MatchesAdapter(matches);
 }
コード例 #3
0
 @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();
 }
コード例 #4
0
 @Override
 public void onCreate(@Nullable Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   RacquetApplication.getApplication().getApplicationComponent().inject(this);
 }