当前位置: 首页>>代码示例>>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;未经允许,请勿转载。