public SortedListTestSetup() { DateTimeZone.setProvider(new UTCProvider()); callbackRecorder = new SortedListCallbackRecorder(); sortedList = new SortedList<>(Article.class, callbackRecorder); Article past = Article.past(); Article prePast = Article.past(); Article current = Article.current(); Article future = Article.future(); Article postFuture = Article.future(); orderedArticleList = new ArrayList<>(); orderedArticleList.add(prePast); orderedArticleList.add(past); orderedArticleList.add(current); orderedArticleList.add(future); orderedArticleList.add(postFuture); shuffledArticles = new ArrayList<>(); for (Article article : orderedArticleList) { shuffledArticles.add(article.dupe()); } Collections.shuffle(shuffledArticles); }
@Test public void packageTest() throws Exception { League league = new Soccer_Total(); DateTimeZone.setProvider(new UTCProvider()); for (Game game : league.pullGamesFromNetwork(null)) { System.out.println(game.getFirstTeam().getCity() + ", " + game.getSecondTeam().getCity()); } assertEquals(true, league.hasSecondPhase()); }
@Before public void setUp() throws Exception { DateTimeZone.setProvider(new UTCProvider()); }