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


Java FastDateFormat.getDateTimeInstance方法代碼示例

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


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

示例1: testIsRunnable_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isRunnable() method test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testIsRunnable_1()
        throws Exception {
    CloudVmStatus cloudVmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT,
            VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    cloudVmStatus.setTotalTps(1);
    cloudVmStatus.setUserDetails(new LinkedList());
    VMNodeBean fixture = new VMNodeBean(cloudVmStatus, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    boolean result = fixture.isRunnable();

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:24,代碼來源:VMNodeBeanTest.java

示例2: testIsStopable_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isStopable() method test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testIsStopable_1()
        throws Exception {
    CloudVmStatus cloudVmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT,
            VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    cloudVmStatus.setTotalTps(1);
    cloudVmStatus.setUserDetails(new LinkedList());
    VMNodeBean fixture = new VMNodeBean(cloudVmStatus, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    boolean result = fixture.isStopable();

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:24,代碼來源:VMNodeBeanTest.java

示例3: testHasSubNodes_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean hasSubNodes() method test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testHasSubNodes_1()
        throws Exception {
    CloudVmStatus cloudVmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT,
            VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    cloudVmStatus.setTotalTps(1);
    cloudVmStatus.setUserDetails(new LinkedList());
    VMNodeBean fixture = new VMNodeBean(cloudVmStatus, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    boolean result = fixture.hasSubNodes();

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:24,代碼來源:VMNodeBeanTest.java

示例4: testAddVMBean_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the void addVMBean(VMNodeBean) method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testAddVMBean_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());
    VMNodeBean vmNode = new VMNodeBean(new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT, VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date()), true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    fixture.addVMBean(vmNode);

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例5: testGetSubNodes_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the List<JobNodeBean> getSubNodes() method test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testGetSubNodes_1()
        throws Exception {
    CloudVmStatus cloudVmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT,
            VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    cloudVmStatus.setTotalTps(1);
    cloudVmStatus.setUserDetails(new LinkedList());
    VMNodeBean fixture = new VMNodeBean(cloudVmStatus, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    List<JobNodeBean> result = fixture.getSubNodes();

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertNotNull(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:24,代碼來源:VMNodeBeanTest.java

示例6: testIsPausable_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isPausable() method test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testIsPausable_1()
        throws Exception {
    CloudVmStatus cloudVmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT,
            VMRegion.ASIA_1, VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    cloudVmStatus.setTotalTps(1);
    cloudVmStatus.setUserDetails(new LinkedList());
    VMNodeBean fixture = new VMNodeBean(cloudVmStatus, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    boolean result = fixture.isPausable();

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:24,代碼來源:VMNodeBeanTest.java

示例7: testGetType_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the String getType() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testGetType_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    String result = fixture.getType();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertNotNull(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例8: testGetVmBeans_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the List<VMNodeBean> getVmBeans() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testGetVmBeans_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    List<VMNodeBean> result = fixture.getVmBeans();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertNotNull(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例9: testIsStopable_2

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isStopable() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testIsStopable_2()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    boolean result = fixture.isStopable();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例10: testHasSubNodes_2

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean hasSubNodes() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testHasSubNodes_2()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    boolean result = fixture.hasSubNodes();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例11: testIsDeleteable_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isDeleteable() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testIsDeleteable_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    boolean result = fixture.isDeleteable();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertTrue(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例12: testIsJobNode_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isJobNode() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testIsJobNode_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    boolean result = fixture.isJobNode();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertTrue(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java

示例13: testVMNodeBean_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the VMNodeBean(CloudVmStatus,boolean) constructor test.
 * 
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testVMNodeBean_1()
        throws Exception {
    CloudVmStatus vmStatus = new CloudVmStatus("", "", "", JobStatus.Completed, VMImageType.AGENT, VMRegion.ASIA_1,
            VMStatus.pending, new ValidationStatus(), 1, 1, new Date(), new Date());
    vmStatus.setTotalTps(1);
    vmStatus.setUserDetails(new LinkedList());
    boolean hasRights = true;

    VMNodeBean result = new VMNodeBean(vmStatus, hasRights, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    // An unexpected exception was thrown in user code while executing this test:
    // java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder
    // at com.intuit.tank.api.enumerated.VMImageType.<init>(VMImageType.java:18)
    // at com.intuit.tank.api.enumerated.VMImageType.<clinit>(VMImageType.java:4)
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertNotNull(result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:26,代碼來源:VMNodeBeanTest.java

示例14: testReCalculate_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the void reCalculate() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testReCalculate_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    fixture.reCalculate();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:30,代碼來源:ActJobNodeBeanTest.java

示例15: testIsPausable_1

import org.apache.commons.lang3.time.FastDateFormat; //導入方法依賴的package包/類
/**
 * Run the boolean isPausable() method test.
 *
 * @throws Exception
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testIsPausable_1()
    throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance jobInstance = new JobInstance(workload, "");
    jobInstance.setEndTime(new Date());
    jobInstance.setJobDetails("");
    jobInstance.setTotalVirtualUsers(1);
    jobInstance.setStatus(JobQueueStatus.Aborted);
    jobInstance.setStartTime(new Date());
    ActJobNodeBean fixture = new ActJobNodeBean(jobInstance, true, FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
    fixture.setVmBeans(new LinkedList());

    boolean result = fixture.isPausable();

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.api.enumerated.IncrementStrategy
    //       at com.intuit.tank.project.BaseJob.<init>(BaseJob.java:28)
    //       at com.intuit.tank.project.JobConfiguration.<init>(JobConfiguration.java:63)
    //       at com.intuit.tank.project.Workload.<init>(Workload.java:57)
    assertTrue(!result);
}
 
開發者ID:intuit,項目名稱:Tank,代碼行數:31,代碼來源:ActJobNodeBeanTest.java


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