本文整理了Java中org.openmrs.Order.isStarted()
方法的一些代码示例,展示了Order.isStarted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.isStarted()
方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:isStarted
[英]Convenience method to determine if order is started as of the current date
[中]确定订单是否从当前日期开始的便捷方法
代码示例来源:origin: openmrs/openmrs-core
/**
* Convenience method to determine if order is started as of the current date
*
* @return boolean indicating whether the order is started as of the current date
* @since 1.10.1
* @see #isStarted(java.util.Date)
*/
public boolean isStarted() {
return isStarted(new Date());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnTrueIfTheOrderIsStartedAndNotScheduled() throws Exception {
Order order = new Order();
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
assertTrue(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnFalseIfTheOrderIsNotYetActivatedAsOfTheCheckDate() throws Exception {
Order order = new Order();
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:09", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnFalseIfDateActivatedIsNull() throws Exception {
Order order = new Order();
assertNull(order.getDateActivated());
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isFuture(java.util.Date)
*/
@Test
public void isFuture_shouldReturnFalseIfDateActivatedIsNull() throws Exception {
Order order = new Order();
assertNull(order.getDateActivated());
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:09", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isFuture(java.util.Date)
*/
@Test
public void isFuture_shouldReturnFalseForAVoidedOrder() throws Exception {
Order order = new Order();
order.setVoided(true);
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:09", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnFalseForAVoidedOrder() throws Exception {
Order order = new Order();
order.setVoided(true);
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnFalseIfTheOrderWasScheduledToStartAfterTheCheckDate() throws Exception {
Order order = new Order();
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
order.setUrgency(Order.Urgency.ON_SCHEDULED_DATE);
order.setScheduledDate(DateUtils.parseDate("2014-11-01 11:11:12", DATE_FORMAT));
assertFalse(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnTrueIfTheOrderWasScheduledToStartOnTheCheckDate() throws Exception {
Order order = new Order();
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
order.setUrgency(Order.Urgency.ON_SCHEDULED_DATE);
order.setScheduledDate(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT));
assertTrue(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see Order#isStarted(java.util.Date)
*/
@Test
public void isStarted_shouldReturnTrueIfTheOrderWasScheduledToStartBeforeTheCheckDate() throws Exception {
Order order = new Order();
order.setDateActivated(DateUtils.parseDate("2014-11-01 11:11:10", DATE_FORMAT));
order.setUrgency(Order.Urgency.ON_SCHEDULED_DATE);
order.setScheduledDate(DateUtils.parseDate("2014-11-01 11:11:11", DATE_FORMAT));
assertTrue(order.isStarted(DateUtils.parseDate("2014-11-01 11:11:12", DATE_FORMAT)));
}
代码示例来源:origin: openmrs/openmrs-core
assertFalse(order.isStarted());
代码示例来源:origin: openmrs/openmrs-core
assertFalse(order.isStarted());
内容来源于网络,如有侵权,请联系作者删除!