01: package com.flexive.tests.shared;
02:
03: import org.testng.annotations.Test;
04: import com.flexive.shared.value.DateRange;
05:
06: import java.util.Date;
07:
08: /**
09: * Tests for the {@link com.flexive.shared.value.DateRange} data type.
10: *
11: * @author Daniel Lichtenberger, UCS
12: * @version $Rev$
13: */
14: public class DateRangeTest {
15: /**
16: * Converts a daterange to a string, then converts it back to a daterange.
17: */
18: @Test(groups="shared")
19: public void dateRangeStringRep() {
20: final DateRange range = new DateRange(new Date(0), new Date());
21: assert new DateRange(range.toString()).equals(range) : "Range constructed from '"
22: + range + "' not equal to original object.";
23: }
24: }
|