Example usage for java.util Locale ITALY

List of usage examples for java.util Locale ITALY

Introduction

In this page you can find the example usage for java.util Locale ITALY.

Prototype

Locale ITALY

To view the source code for java.util Locale ITALY.

Click Source Link

Document

Useful constant for country.

Usage

From source file:org.jfree.data.time.junit.SecondTest.java

/**
 * Some checks for the getStart() method.
 *//*from  w  ww. j  av  a  2  s .  co m*/
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 0);
    Second s = new Second(55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), s.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.MillisecondTest.java

/**
 * Some checks for the getStart() method.
 *//*w w w  . j a va2 s .c  om*/
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 555);
    Millisecond m = new Millisecond(555, 55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.YearTest.java

/**
 * Some checks for the getEnd() method.//from www .j  ava  2 s.  c  om
 */
@Test
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.DECEMBER, 31, 23, 59, 59);
    cal.set(Calendar.MILLISECOND, 999);
    Year y = new Year(2006);
    assertEquals(cal.getTime(), y.getEnd());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.HourTest.java

/**
 * Some checks for the getEnd() method./*ww  w  .  j  a va  2s .  co m*/
 */
@Test
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 8, 1, 59, 59);
    cal.set(Calendar.MILLISECOND, 999);
    Hour h = new Hour(1, 8, 1, 2006);
    assertEquals(cal.getTime(), h.getEnd());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.junit.MinuteTest.java

/**
 * Some checks for the getEnd() method.//  w  w  w. j  av  a 2  s . c  om
 */
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    TimeZone savedZone = TimeZone.getDefault();
    TimeZone.setDefault(TimeZone.getTimeZone("Europe/Rome"));
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 59);
    cal.set(Calendar.MILLISECOND, 999);
    Minute m = new Minute(47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getEnd());
    Locale.setDefault(saved);
    TimeZone.setDefault(savedZone);
}

From source file:org.jfree.data.time.junit.SecondTest.java

/**
 * Some checks for the getEnd() method./*from   w  w  w  . j  a  va 2  s. c  o  m*/
 */
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 999);
    Second s = new Second(55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), s.getEnd());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.DayTest.java

/**
 * Some checks for the getStart() method.
 *///  w w  w  . ja va 2 s .co m
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.NOVEMBER, 3, 0, 0, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Day d = new Day(3, 11, 2006);
    assertEquals(cal.getTime(), d.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.MillisecondTest.java

/**
 * Some checks for the getEnd() method.//w w  w  .  j  a va  2s  .c  om
 */
@Test
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 555);
    Millisecond m = new Millisecond(555, 55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getEnd());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.MonthTest.java

/**
 * Some checks for the getStart() method.
 *///from   w ww  . ja va2s  .co  m
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.MARCH, 1, 0, 0, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Month m = new Month(3, 2006);
    assertEquals(cal.getTime(), m.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.junit.HourTest.java

/**
 * Some checks for the getStart() method.
 *///from www  . ja  v  a 2  s . co m
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 0, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Hour h = new Hour(3, 16, 1, 2006);
    assertEquals(cal.getTime(), h.getStart());
    Locale.setDefault(saved);
}