當前位置: 首頁>>代碼示例>>Java>>正文


Java Locale.GERMANY屬性代碼示例

本文整理匯總了Java中java.util.Locale.GERMANY屬性的典型用法代碼示例。如果您正苦於以下問題:Java Locale.GERMANY屬性的具體用法?Java Locale.GERMANY怎麽用?Java Locale.GERMANY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.util.Locale的用法示例。


在下文中一共展示了Locale.GERMANY屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Quarter q = new Quarter(3, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(1001890799999L, q.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        q.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:QuarterTests.java

示例2: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Week w = new Week(1, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(978307200000L, w.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        w.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:WeekTests.java

示例3: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Week w = new Week(52, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(1009756799999L, w.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        w.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:WeekTests.java

示例4: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Month m = new Month(1, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(978307200000L, m.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:MonthTests.java

示例5: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Month m = new Month(3, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(986079599999L, m.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:MonthTests.java

示例6: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Millisecond m = new Millisecond(500, 55, 40, 2, 15, 4, 2000);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(955762855500L, m.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:MillisecondTests.java

示例7: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Millisecond m = new Millisecond(250, 50, 45, 21, 21, 4, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(987885950250L, m.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:MillisecondTests.java

示例8: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Year y = new Year(2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(978307200000L, y.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        y.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:YearTests.java

示例9: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Year y = new Year(2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(1009843199999L, y.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        y.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:YearTests.java

示例10: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Hour h = new Hour(21, 21, 4, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(987886799999L, h.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        h.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:HourTests.java

示例11: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Second s = new Second(55, 40, 2, 15, 4, 2000);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(955762855000L, s.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        s.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:SecondTests.java

示例12: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Day d = new Day(1, 12, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(1007164800000L, d.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        d.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:DayTests.java

示例13: testGetLastMillisecondWithCalendar

/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Day d = new Day(4, 5, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(989017199999L, d.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        d.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:DayTests.java

示例14: testGetFirstMillisecondWithCalendar

/**
 * Some checks for the getFirstMillisecond(TimeZone) method.
 */
public void testGetFirstMillisecondWithCalendar() {
    Quarter q = new Quarter(1, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    assertEquals(978307200000L, q.getFirstMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        q.getFirstMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:QuarterTests.java

示例15: testCreateLocalization

public void testCreateLocalization() {
    String codeName = "test-localization";
    String specificationVersion = "1.0";
    String moduleSpecificationVersion = "1.0";
    Locale locale = Locale.GERMANY;
    String branding = "";
    String localizedName = "Lokal";
    String localizedDescription = "Lokal-modul";
    URL distribution = null;
    try {
        new URL ("http://netbeans.de/localization.nbm");
    } catch (MalformedURLException ex) {
        fail (ex.getMessage ());
    }
    UpdateLicense license = UpdateLicense.createUpdateLicense ("none-license", "no-license");
    
    UpdateItem result = UpdateItem.createLocalization(codeName,
                                                      specificationVersion,
                                                      moduleSpecificationVersion,
                                                      locale, branding,
                                                      localizedName,
                                                      localizedDescription,
                                                      "test-category",
                                                      distribution,
                                                      false, false, null,
                                                      license);

    assertNotNull ("Localization UpdateItem was created.", result);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:29,代碼來源:UpdateItemTest.java


注:本文中的java.util.Locale.GERMANY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。