Example usage for org.apache.commons.lang.time FastDateFormat MEDIUM

List of usage examples for org.apache.commons.lang.time FastDateFormat MEDIUM

Introduction

In this page you can find the example usage for org.apache.commons.lang.time FastDateFormat MEDIUM.

Prototype

int MEDIUM

To view the source code for org.apache.commons.lang.time FastDateFormat MEDIUM.

Click Source Link

Document

MEDIUM locale dependent date or time style.

Usage

From source file:com.intuit.tank.job.VMNodeBeanTest.java

/**
 * Run the VMNodeBean(CloudVmStatus,boolean) constructor test.
 * /*from   w ww . j  a v  a 2  s . c  om*/
 * @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);
}

From source file:com.intuit.tank.job.ActJobNodeBeanTest.java

/**
 * Run the ActJobNodeBean(JobInstance,boolean) constructor test.
 *
 * @throws Exception//  w  w  w .ja va2s.c  om
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testActJobNodeBean_1() throws Exception {
    Workload workload = new Workload();
    workload.setJobConfiguration(new JobConfiguration());
    JobInstance job = new JobInstance(workload, "");
    job.setEndTime(new Date());
    job.setJobDetails("");
    job.setTotalVirtualUsers(1);
    job.setStatus(JobQueueStatus.Aborted);
    job.setStartTime(new Date());
    boolean hasRights = true;

    ActJobNodeBean result = new ActJobNodeBean(job, 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.IncrementStrategy.<init>(IncrementStrategy.java:23)
    //       at com.intuit.tank.api.enumerated.IncrementStrategy.<clinit>(IncrementStrategy.java:13)
    //       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);
}

From source file:com.intuit.tank.job.ProjectNodeBeanTest.java

/**
 * Run the void addJob(ActJobNodeBean) method test.
 *
 * @throws Exception/* w  w  w .  j  a  v  a2s  .  c o m*/
 *
 * @generatedBy CodePro at 12/15/14 3:54 PM
 */
@Test
public void testAddJob_1() throws Exception {
    Project project = new Project();
    project.setName("");
    ProjectNodeBean fixture = new ProjectNodeBean(project);
    fixture.setJobBeans(new LinkedList());
    ActJobNodeBean jobNode = new ActJobNodeBean(new JobInstance(), true,
            FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

    fixture.addJob(jobNode);

    // An unexpected exception was thrown in user code while executing this test:
    //    java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder
    //       at com.intuit.tank.project.Project.<init>(Project.java:77)
}

From source file:com.intuit.tank.job.VMNodeBeanTest.java

/**
 * Run the List<JobNodeBean> getSubNodes() method test.
 * /* w ww . j  a  va  2  s  . c  om*/
 * @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);
}

From source file:com.intuit.tank.job.ActJobNodeBeanTest.java

/**
 * Run the ActJobNodeBean(String,CloudVmStatusContainer) constructor test.
 *
 * @throws Exception/*from   w w  w.ja v  a2  s. com*/
 *
 * @generatedBy CodePro at 12/15/14 3:52 PM
 */
@Test
public void testActJobNodeBean_2() throws Exception {
    String jobId = "";
    CloudVmStatusContainer container = new CloudVmStatusContainer();
    container.setStatus(JobQueueStatus.Aborted);
    container.setEndTime(new Date());
    container.setStartTime(new Date());

    ActJobNodeBean result = new ActJobNodeBean(jobId, container,
            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.model.v1.cloud.CloudVmStatusContainer.<init>(CloudVmStatusContainer.java:79)
    assertNotNull(result);
}

From source file:com.intuit.tank.job.VMNodeBeanTest.java

/**
 * Run the String getType() method test.
 * /*w  w  w. j a  va  2  s. c o m*/
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testGetType_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));

    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.VMImageType
    // at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    assertNotNull(result);
}

From source file:com.intuit.tank.job.ActJobNodeBeanTest.java

/**
 * Run the void addVMBean(VMNodeBean) method test.
 *
 * @throws Exception//from   w ww .j ava  2s  . com
 *
 * @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)
}

From source file:com.intuit.tank.job.VMNodeBeanTest.java

/**
 * Run the boolean hasSubNodes() method test.
 * //  ww w .j a  v a  2s  . c  om
 * @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);
}

From source file:edu.ku.brc.specify.tests.PreferenceTest.java

/**
 * Tests the Date formating/*  www  . j  a  v a 2s. c o m*/
 */
public void testSimpleDateFormat() {
    FastDateFormat fastDateFormat = FastDateFormat.getDateInstance(FastDateFormat.SHORT);
    SimpleDateFormat df = new SimpleDateFormat(fastDateFormat.getPattern());
    log.info(df.toPattern());
    log.info(df.format(new Date()));

    fastDateFormat = FastDateFormat.getDateInstance(FastDateFormat.MEDIUM);
    df = new SimpleDateFormat(fastDateFormat.getPattern());
    log.info(df.toPattern());
    log.info(df.format(new Date()));

    fastDateFormat = FastDateFormat.getDateInstance(FastDateFormat.LONG);
    df = new SimpleDateFormat(fastDateFormat.getPattern());
    log.info(df.toPattern());
    log.info(df.format(new Date()));
}

From source file:com.intuit.tank.job.VMNodeBeanTest.java

/**
 * Run the boolean isKillable() method test.
 * /*from  w  ww  .  ja  v  a2 s  .c  om*/
 * @throws Exception
 * 
 * @generatedBy CodePro at 12/15/14 3:53 PM
 */
@Test
public void testIsKillable_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.isKillable();

    // 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);
}