Java 类org.joda.time.tz.UTCProvider 实例源码

项目:playbook-android-sortedlist    文件:SortedListTestSetup.java   
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);
}
项目:Android-Scrapper    文件:ExampleUnitTest.java   
@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());
}
项目:Red-Calorie    文件:JodaTimePropertyConverterTest.java   
@Before
public void setUp() throws Exception {
    DateTimeZone.setProvider(new UTCProvider());
}