fix minor issues

This commit is contained in:
Jacky 2018-05-09 23:15:51 -04:00
parent c1132aa58a
commit cf5c884ca0
2 changed files with 18 additions and 22 deletions

View File

@ -20,8 +20,13 @@ import com.google.refine.tests.RefineTest;
public class IncTests extends RefineTest {
static Properties bindings;
private static Properties bindings;
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
@Override
@BeforeTest
@ -30,12 +35,12 @@ public class IncTests extends RefineTest {
}
@BeforeMethod
public void SetUp() {
public void setUp() {
bindings = new Properties();
}
@AfterMethod
public void TearDown() {
public void tearDown() {
bindings = null;
}
@ -55,13 +60,6 @@ public class IncTests extends RefineTest {
}
}
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
@Test
public void testInc() {
OffsetDateTime source = OffsetDateTime.parse("20180510-23:55:44.000789000Z",

View File

@ -18,8 +18,13 @@ import com.google.refine.tests.RefineTest;
public class NowTests extends RefineTest {
static Properties bindings;
private static Properties bindings;
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
@Override
@BeforeTest
@ -28,12 +33,12 @@ public class NowTests extends RefineTest {
}
@BeforeMethod
public void SetUp() {
public void setUp() {
bindings = new Properties();
}
@AfterMethod
public void TearDown() {
public void tearDown() {
bindings = null;
}
@ -53,13 +58,6 @@ public class NowTests extends RefineTest {
}
}
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
@Test
public void testNow() {
// 2018-4-30 23:55:44