Skip to content

Commit

Permalink
TRUNK-4443 Corrected messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorytkowski committed Aug 6, 2014
1 parent 8ceffb9 commit d8ea99e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 12 additions & 12 deletions api/src/test/java/org/openmrs/OrderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ public void shouldIsDiscontinued() throws Exception {
assertFalse("order without dates shouldn't be discontinued", o.isDiscontinued(ymd.parse("2007-10-26")));

o.setDateActivated(ymd.parse("2007-01-01"));
assertFalse("shouldn't be discontinued before start date", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("shouldn't be discontinued before date activated", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("order without no end dates shouldn't be discontinued", o.isDiscontinued(ymd.parse("2007-10-26")));

o.setAutoExpireDate(ymd.parse("2007-12-31"));
assertFalse("shouldn't be discontinued before start date", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("shouldn't be discontinued before date activated", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("shouldn't be discontinued before autoExpireDate", o.isDiscontinued(ymd.parse("2007-10-26")));
assertFalse("shouldn't be discontinued after autoExpireDate", o.isDiscontinued(ymd.parse("2008-10-26")));

OrderUtilTest.setDateStopped(o, ymd.parse("2007-11-01"));
assertFalse("shouldn't be discontinued before start date", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("shouldn't be discontinued before date activated", o.isDiscontinued(ymd.parse("2006-10-26")));
assertFalse("shouldn't be discontinued before dateStopped", o.isDiscontinued(ymd.parse("2007-10-26")));
assertTrue("should be discontinued after dateStopped", o.isDiscontinued(ymd.parse("2007-11-26")));

Expand All @@ -126,25 +126,25 @@ public void shouldIsCurrent() throws Exception {
DateFormat ymd = new SimpleDateFormat("yyyy-MM-dd");

Order o = new Order();
assertTrue("startDate==null && no end date should always be current", o.isCurrent(ymd.parse("2007-10-26")));
assertTrue("dateActivated==null && no end date should always be current", o.isCurrent(ymd.parse("2007-10-26")));

o.setDateActivated(ymd.parse("2007-01-01"));
assertFalse("shouldn't be current before startDate", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current after startDate", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current before dateActivated", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current after dateActivated", o.isCurrent(ymd.parse("2007-10-26")));

o.setAutoExpireDate(ymd.parse("2007-12-31"));
assertFalse("shouldn't be current before startDate", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between startDate and autoExpireDate", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current before dateActivated", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between dateActivated and autoExpireDate", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current after autoExpireDate", o.isCurrent(ymd.parse("2008-10-26")));

OrderUtilTest.setDateStopped(o, ymd.parse("2007-11-01"));
assertFalse("shouldn't be current before startDate", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between startDate and dateStopped", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current before dateActivated", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between dateActivated and dateStopped", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current after dateStopped", o.isCurrent(ymd.parse("2007-11-26")));

OrderUtilTest.setDateStopped(o, ymd.parse("2007-11-01"));
assertFalse("shouldn't be current before startDate", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between startDate and dateStopped", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current before dateActivated", o.isCurrent(ymd.parse("2006-10-26")));
assertTrue("should be current between dateActivated and dateStopped", o.isCurrent(ymd.parse("2007-10-26")));
assertFalse("shouldn't be current after dateStopped", o.isCurrent(ymd.parse("2007-11-26")));
}

Expand Down
4 changes: 0 additions & 4 deletions webapp/src/main/webapp/WEB-INF/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1411,16 +1411,12 @@ Order.drug.saved=Drug Order saved
Order.drug.deleted=Drug Order deleted
Order.drug.place.patient=Place Order for this Patient
Order.error.encounterPatientMismatch=Encounter for this order must belong to Patient for this order
#Order.error.startDateAfterDiscontinuedDate=Start date must be before discontinued date
Order.error.dateActivatedAfterDiscontinuedDate=Date activated must be before discontinued date
#Order.error.startDateAfterAutoExpireDate=Start date must be before auto-expire date
Order.error.dateActivatedAfterAutoExpireDate=Date activated must be before auto-expire date
Orderable.search.placeholder=Enter orderable
#Order.error.startDateInFuture=Start date cannot be in the future
Order.error.dateActivatedInFuture=Date activated cannot be in the future
Order.error.scheduledDateNullForOnScheduledDateUrgency=Scheduled date is required when urgency is set to on scheduled date
Order.error.urgencyNotOnScheduledDate=Scheduled date should not be set when urgency is not set to on scheduled date
#Order.error.startDateAfterEncounterDatetime=Start date cannot be before that of the associated encounter
Order.error.dateActivatedAfterEncounterDatetime=Date activated cannot be before that of the associated encounter
Order.error.orderTypeClassMismatchesOrderClass=The java type of an order must match that set on associated order type

Expand Down

0 comments on commit d8ea99e

Please sign in to comment.