JobDetailFormatter { protected static long getSimulationTime(JobInstance proposedJobInstance, Workload workload, JobValidator validator) { long ret = proposedJobInstance.getSimulationTime(); if (TerminationPolicy.script == proposedJobInstance.getTerminationPolicy()) { ret = 0; for (TestPlan plan : workload.getTestPlans()) { ret = Math.max(ret, validator.getExpectedTime(plan.getName())); } } return ret; }  static String createJobDetails(JobValidator validator, Workload workload, JobInstance proposedJobInstance); static String createJobDetails(JobValidator validator, String scriptName);  }
@Test public void getSimulationTime() { JobInstance ji = new JobInstance(); ji.setSimulationTime(2000L); }
@Test public void testGetSimulationTime_1() throws Exception { JobInstance proposedJobInstance = new JobInstance(); Workload workload = new Workload(); workload.setTestPlan(new LinkedList()); JobValidator validator = new JobValidator(new Script()); long result = JobDetailFormatter.getSimulationTime(proposedJobInstance, workload, validator); assertEquals(0L, result); }
@Test public void testGetSimulationTime_2() throws Exception { JobInstance proposedJobInstance = new JobInstance(); Workload workload = new Workload(); workload.setTestPlan(new LinkedList()); JobValidator validator = new JobValidator(new Script()); long result = JobDetailFormatter.getSimulationTime(proposedJobInstance, workload, validator); assertEquals(0L, result); }
@Test public void testGetSimulationTime_3() throws Exception { JobInstance proposedJobInstance = new JobInstance(); Workload workload = new Workload(); JobValidator validator = new JobValidator(new Script()); long result = JobDetailFormatter.getSimulationTime(proposedJobInstance, workload, validator); assertEquals(0L, result); }