--- old/test/java/time/test/java/time/format/TestNumberPrinter.java 2013-02-08 10:49:37.000000000 -0800 +++ new/test/java/time/test/java/time/format/TestNumberPrinter.java 2013-02-08 10:49:37.000000000 -0800 @@ -59,8 +59,6 @@ */ package test.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.HOUR_OF_DAY; import static org.testng.Assert.assertEquals; @@ -68,10 +66,11 @@ import java.time.DateTimeException; import java.time.LocalDate; -import test.java.time.temporal.MockFieldValue; +import java.time.format.SignStyle; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import test.java.time.temporal.MockFieldValue; /** * Test SimpleNumberPrinterParser. @@ -82,12 +81,12 @@ //----------------------------------------------------------------------- @Test(expectedExceptions=DateTimeException.class) public void test_print_emptyCalendrical() throws Exception { - getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).printTo(EMPTY_DTA, buf); + getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(EMPTY_DTA, buf); } public void test_print_append() throws Exception { buf.append("EXISTING"); - getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).printTo(LocalDate.of(2012, 1, 3), buf); + getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(LocalDate.of(2012, 1, 3), buf); assertEquals(buf.toString(), "EXISTING3"); } @@ -185,12 +184,12 @@ @Test(dataProvider="Pad") public void test_pad_NOT_NEGATIVE(int minPad, int maxPad, long value, String result) throws Exception { try { - getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NOT_NEGATIVE).printTo(new MockFieldValue(DAY_OF_MONTH, value), buf); + getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NOT_NEGATIVE).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf); if (result == null || value < 0) { fail("Expected exception"); } assertEquals(buf.toString(), result); - } catch (DateTimePrintException ex) { + } catch (DateTimeException ex) { if (result == null || value < 0) { assertEquals(ex.getMessage().contains(DAY_OF_MONTH.getName()), true); } else { @@ -202,12 +201,12 @@ @Test(dataProvider="Pad") public void test_pad_NEVER(int minPad, int maxPad, long value, String result) throws Exception { try { - getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NEVER).printTo(new MockFieldValue(DAY_OF_MONTH, value), buf); + getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NEVER).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf); if (result == null) { fail("Expected exception"); } assertEquals(buf.toString(), result); - } catch (DateTimePrintException ex) { + } catch (DateTimeException ex) { if (result != null) { throw ex; } @@ -218,12 +217,12 @@ @Test(dataProvider="Pad") public void test_pad_NORMAL(int minPad, int maxPad, long value, String result) throws Exception { try { - getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NORMAL).printTo(new MockFieldValue(DAY_OF_MONTH, value), buf); + getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NORMAL).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf); if (result == null) { fail("Expected exception"); } assertEquals(buf.toString(), (value < 0 ? "-" + result : result)); - } catch (DateTimePrintException ex) { + } catch (DateTimeException ex) { if (result != null) { throw ex; } @@ -234,12 +233,12 @@ @Test(dataProvider="Pad") public void test_pad_ALWAYS(int minPad, int maxPad, long value, String result) throws Exception { try { - getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.ALWAYS).printTo(new MockFieldValue(DAY_OF_MONTH, value), buf); + getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.ALWAYS).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf); if (result == null) { fail("Expected exception"); } assertEquals(buf.toString(), (value < 0 ? "-" + result : "+" + result)); - } catch (DateTimePrintException ex) { + } catch (DateTimeException ex) { if (result != null) { throw ex; } @@ -250,7 +249,7 @@ @Test(dataProvider="Pad") public void test_pad_EXCEEDS_PAD(int minPad, int maxPad, long value, String result) throws Exception { try { - getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.EXCEEDS_PAD).printTo(new MockFieldValue(DAY_OF_MONTH, value), buf); + getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.EXCEEDS_PAD).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf); if (result == null) { fail("Expected exception"); return; // unreachable @@ -259,7 +258,7 @@ result = (value < 0 ? "-" + result : "+" + result); } assertEquals(buf.toString(), result); - } catch (DateTimePrintException ex) { + } catch (DateTimeException ex) { if (result != null) { throw ex; }