dnet40/modules/dnet-download-plugins/tags/dnet-download-plugins-1.0.1/src/test/java/DateIntervalTest.java @ 50206
1 |
import org.joda.time.DateTime; |
---|---|
2 |
import org.joda.time.Days; |
3 |
import org.junit.Assert; |
4 |
import org.junit.Before; |
5 |
import org.junit.Test; |
6 |
|
7 |
public class DateIntervalTest { |
8 |
|
9 |
@Before
|
10 |
public void setUp() throws Exception {} |
11 |
|
12 |
@Test
|
13 |
public void test() { |
14 |
DateTime beforeDate = new DateTime(2010, 01, 1, 0, 0); |
15 |
DateTime now = new DateTime(); |
16 |
|
17 |
Days day = Days.daysBetween(beforeDate, now); |
18 |
Assert.assertTrue(day.getDays() > 0); |
19 |
}
|
20 |
|
21 |
}
|