本文整理汇总了Java中org.joda.time.tz.UTCProvider类的典型用法代码示例。如果您正苦于以下问题:Java UTCProvider类的具体用法?Java UTCProvider怎么用?Java UTCProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UTCProvider类属于org.joda.time.tz包,在下文中一共展示了UTCProvider类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SortedListTestSetup
import org.joda.time.tz.UTCProvider; //导入依赖的package包/类
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);
}
示例2: packageTest
import org.joda.time.tz.UTCProvider; //导入依赖的package包/类
@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());
}
示例3: setUp
import org.joda.time.tz.UTCProvider; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
DateTimeZone.setProvider(new UTCProvider());
}