Skip to content

Commit

Permalink
Updated UUID to new way in Converter.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Jan 18, 2024
1 parent 78480bd commit d65ccf1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/test/java/com/cedarsoftware/util/TestDateUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,4 @@ void testEpochMillis()
gmtDateString = sdf.format(date);
assertEquals("31690708-07-05 01:46:39.999", gmtDateString);
}

@Test
void testSimpleDate()
{
SafeSimpleDateFormat format = new SafeSimpleDateFormat("yyyy/mm/dd");
System.out.println("format = " + format);
}
}
27 changes: 17 additions & 10 deletions src/test/java/com/cedarsoftware/util/TestSimpleDateFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class TestSimpleDateFormat
{
@Test
public void testSimpleDateFormat1() throws Exception
void testSimpleDateFormat1() throws Exception
{
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yyyy-MM-dd");
String s = x.format(getDate(2013, 9, 7, 16, 15, 31));
Expand All @@ -57,7 +57,7 @@ public void testSimpleDateFormat1() throws Exception
}

@Test
public void testSetLenient() throws Exception
void testSetLenient() throws Exception
{
//February 942, 1996
SafeSimpleDateFormat x = new SafeSimpleDateFormat("MMM dd, yyyy");
Expand All @@ -84,7 +84,7 @@ public void testSetLenient() throws Exception
}

@Test
public void testSetCalendar() throws Exception
void testSetCalendar() throws Exception
{
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yyyy-MM-dd hh:mm:ss");
x.setCalendar(Calendar.getInstance());
Expand Down Expand Up @@ -143,7 +143,7 @@ public void testSetCalendar() throws Exception
}

@Test
public void testSetDateSymbols() throws Exception {
void testSetDateSymbols() throws Exception {
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yyyy-MM-dd hh:mm:ss");
x.setCalendar(Calendar.getInstance());

Expand Down Expand Up @@ -185,7 +185,7 @@ public Number parse(String source, ParsePosition parsePosition) {
}

@Test
public void testTimeZone() throws Exception
void testTimeZone() throws Exception
{
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String s = x.format(getDate(2013, 9, 7, 16, 15, 31));
Expand Down Expand Up @@ -227,7 +227,7 @@ public void testTimeZone() throws Exception
}

@Test
public void testConcurrencyWillFail() throws Exception
void testConcurrencyWillFail() throws Exception
{
final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
final Random random = new Random();
Expand Down Expand Up @@ -313,7 +313,7 @@ else if (op < 20)
}

@Test
public void testConcurrencyWontFail() throws Exception
void testConcurrencyWontFail() throws Exception
{
final SafeSimpleDateFormat format = new SafeSimpleDateFormat("yyyy-MM-dd HH:mm:ss");
final Random random = new Random();
Expand Down Expand Up @@ -399,7 +399,7 @@ else if (op < 20)
}

@Test
public void testParseObject() {
void testParseObject() {
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yyyy-MM-dd");
String s = x.format(getDate(2013, 9, 7, 16, 15, 31));
String d = "date: " + s;
Expand All @@ -416,7 +416,7 @@ public void testParseObject() {
}

@Test
public void test2DigitYear() throws Exception {
void test2DigitYear() throws Exception {
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yy-MM-dd");
String s = x.format(getDate(13, 9, 7, 16, 15, 31));
assertEquals("13-09-07", s);
Expand All @@ -442,7 +442,7 @@ public void test2DigitYear() throws Exception {
}

@Test
public void testSetSymbols() throws Exception {
void testSetSymbols() throws Exception {
SafeSimpleDateFormat x = new SafeSimpleDateFormat("yy.MM.dd hh:mm aaa");
String s = x.format(getDate(13, 9, 7, 16, 15, 31));
assertEquals("13.09.07 04:15 PM", s);
Expand All @@ -458,6 +458,13 @@ public void testSetSymbols() throws Exception {
assertEquals("13.09.07 04:15 bar", s);
}

@Test
void testToString()
{
SafeSimpleDateFormat safe = new SafeSimpleDateFormat("yyyy/MM/dd");
assertEquals(safe.toString(), "yyyy/MM/dd");
}

private Date getDate(int year, int month, int day, int hour, int min, int sec)
{
Calendar cal = Calendar.getInstance();
Expand Down

0 comments on commit d65ccf1

Please sign in to comment.