diff --git a/pom.xml b/pom.xml
index edf29873..36a8482a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.hisp.dhis.rules
rule-engine
- 2.1.8.2-SNAPSHOT
+ 2.1.8.3-SNAPSHOT
jar
rule-engine
diff --git a/src/main/java/org/hisp/dhis/rules/RuleVariableValueMapBuilder.java b/src/main/java/org/hisp/dhis/rules/RuleVariableValueMapBuilder.java
index ddef4220..48962116 100644
--- a/src/main/java/org/hisp/dhis/rules/RuleVariableValueMapBuilder.java
+++ b/src/main/java/org/hisp/dhis/rules/RuleVariableValueMapBuilder.java
@@ -281,7 +281,7 @@ private Map buildEnvironmentVariables()
String currentDate = dateFormat.format( new Date() );
valueMap.put( RuleEngineUtils.ENV_VAR_CURRENT_DATE,
- create( currentDate, RuleValueType.TEXT, Arrays.asList( currentDate ), currentDate ) );
+ create( currentDate, RuleValueType.DATE, Arrays.asList( currentDate ), currentDate ) );
if ( triggerEnvironment != null )
{
@@ -307,11 +307,11 @@ private Map buildEnvironmentVariables()
String enrollmentDate = dateFormat.format( ruleEnrollment.enrollmentDate() );
valueMap.put( RuleEngineUtils.ENV_VAR_ENROLLMENT_DATE, create( enrollmentDate,
- RuleValueType.TEXT, Arrays.asList( enrollmentDate ), currentDate ) );
+ RuleValueType.DATE, Arrays.asList( enrollmentDate ), currentDate ) );
String incidentDate = dateFormat.format( ruleEnrollment.incidentDate() );
valueMap.put( RuleEngineUtils.ENV_VAR_INCIDENT_DATE, create( incidentDate,
- RuleValueType.TEXT, Arrays.asList( incidentDate ), currentDate ) );
+ RuleValueType.DATE, Arrays.asList( incidentDate ), currentDate ) );
String status = ruleEnrollment.status().toString();
valueMap.put( RuleEngineUtils.ENV_VAR_ENROLLMENT_STATUS, create( status,
@@ -330,18 +330,18 @@ private Map buildEnvironmentVariables()
if ( ruleEvent != null )
{
String eventDate = dateFormat.format( ruleEvent.eventDate() );
- valueMap.put( RuleEngineUtils.ENV_VAR_EVENT_DATE, create( eventDate, RuleValueType.TEXT,
+ valueMap.put( RuleEngineUtils.ENV_VAR_EVENT_DATE, create( eventDate, RuleValueType.DATE,
Arrays.asList( eventDate ), currentDate ) );
if ( ruleEvent.dueDate() != null ) {
String dueDate = dateFormat.format(ruleEvent.dueDate());
- valueMap.put(RuleEngineUtils.ENV_VAR_DUE_DATE, create(dueDate, RuleValueType.TEXT,
+ valueMap.put(RuleEngineUtils.ENV_VAR_DUE_DATE, create(dueDate, RuleValueType.DATE,
Arrays.asList(dueDate), currentDate));
}
if ( ruleEvent.completedDate() != null )
{
String completedDate = dateFormat.format( ruleEvent.completedDate() );
- valueMap.put( RuleEngineUtils.ENV_VAR_COMPLETED_DATE, create( completedDate, RuleValueType.TEXT,
+ valueMap.put( RuleEngineUtils.ENV_VAR_COMPLETED_DATE, create( completedDate, RuleValueType.DATE,
Arrays.asList( completedDate ), currentDate ) );
}
diff --git a/src/test/java/org/hisp/dhis/rules/RuleVariableValueMapBuilderTest.java b/src/test/java/org/hisp/dhis/rules/RuleVariableValueMapBuilderTest.java
index d83dc9dd..145ec234 100644
--- a/src/test/java/org/hisp/dhis/rules/RuleVariableValueMapBuilderTest.java
+++ b/src/test/java/org/hisp/dhis/rules/RuleVariableValueMapBuilderTest.java
@@ -135,10 +135,10 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), dueDate, "", null, Arrays.asList
assertThat( valueMap.size() ).isEqualTo( 13 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) ).hasValue( wrap( dateFormat.format( eventDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventDate ) );
assertThatVariable( valueMap.get( "event_status" ) ).hasValue( wrap( RuleEvent.Status.ACTIVE.toString() ) )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( RuleEvent.Status.ACTIVE.toString() );
@@ -151,7 +151,7 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), dueDate, "", null, Arrays.asList
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_event_uid" );
assertThatVariable( valueMap.get( "due_date" ) ).hasValue( wrap( dateFormat.format( dueDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dueDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dueDate ) );
assertThatVariable( valueMap.get( "test_variable_one" ) ).hasValue( "test_value_one" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_value_one" );
@@ -202,11 +202,11 @@ RuleEvent.Status.ACTIVE, currentEventDate, new Date(), currentEventDueDate, "",
assertThat( valueMap.size() ).isEqualTo( 12 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( currentEventDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( currentEventDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( currentEventDate ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "3" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "3" );
@@ -266,11 +266,11 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventDueCurrent, "",
assertThat( valueMap.size() ).isEqualTo( 13 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( dateEventCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventCurrent ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "3" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "3" );
@@ -280,7 +280,7 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventDueCurrent, "",
assertThatVariable( valueMap.get( "due_date" ) )
.hasValue( wrap( dateFormat.format( dateEventDueCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventDueCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventDueCurrent ) );
assertThatVariable( valueMap.get( "test_variable_one" ) )
.hasValue( "test_value_dataelement_one_current" )
@@ -332,11 +332,11 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventDueCurrent, "",
assertThat( valueMap.size() ).isEqualTo( 12 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( dateEventCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventCurrent ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "4" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "4" );
@@ -346,7 +346,7 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventDueCurrent, "",
assertThatVariable( valueMap.get( "due_date" ) )
.hasValue( wrap( dateFormat.format( dateEventDueCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventDueCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventDueCurrent ) );
assertThatVariable( valueMap.get( "test_variable" ) ).hasValue( "test_value_one" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_value_one", "test_value_current" );
@@ -380,10 +380,10 @@ RuleEvent.Status.ACTIVE, dateEventTwo, new Date(), dateEventTwo, "", null, Array
assertThat( valueMap.size() ).isEqualTo( 12 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) ).hasValue( wrap( dateFormat.format( dateEventTwo ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventTwo ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventTwo ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
@@ -392,7 +392,7 @@ RuleEvent.Status.ACTIVE, dateEventTwo, new Date(), dateEventTwo, "", null, Array
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_event_uid_two" );
assertThatVariable( valueMap.get( "due_date" ) ).hasValue( wrap( dateFormat.format( dateEventTwo ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventTwo ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventTwo ) );
assertThatVariable( valueMap.get( "test_variable" ) ).hasValue( null )
.isTypeOf( RuleValueType.TEXT ).hasCandidates();
@@ -436,11 +436,11 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventCurrent, "", nul
assertThat( valueMap.size() ).isEqualTo( 12 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( dateEventCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventCurrent ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "4" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "4" );
@@ -450,7 +450,7 @@ RuleEvent.Status.ACTIVE, dateEventCurrent, new Date(), dateEventCurrent, "", nul
assertThatVariable( valueMap.get( "due_date" ) )
.hasValue( wrap( dateFormat.format( dateEventCurrent ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( dateEventCurrent ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( dateEventCurrent ) );
assertThatVariable( valueMap.get( "test_variable" ) ).hasValue( "test_value_two" )
.isTypeOf( RuleValueType.TEXT )
@@ -500,10 +500,10 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), eventDate, "", null, Arrays.asLi
assertThat( valueMap.size() ).isEqualTo( 20 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( dateFormat.format( new Date() ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( new Date() ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( new Date() ) );
assertThatVariable( valueMap.get( "event_date" ) ).hasValue( wrap( dateFormat.format( eventDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventDate ) );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
@@ -512,7 +512,7 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), eventDate, "", null, Arrays.asLi
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_event_uid" );
assertThatVariable( valueMap.get( "due_date" ) ).hasValue( wrap( dateFormat.format( eventDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventDate ) );
assertThatVariable( valueMap.get( "enrollment_status" ) )
.hasValue( wrap( RuleEnrollment.Status.ACTIVE.toString() ) )
@@ -520,7 +520,7 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), eventDate, "", null, Arrays.asLi
assertThatVariable( valueMap.get( "enrollment_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( valueMap.get( "enrollment_id" ) ).hasValue( "test_enrollment" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_enrollment" );
@@ -530,7 +530,7 @@ RuleEvent.Status.ACTIVE, eventDate, new Date(), eventDate, "", null, Arrays.asLi
assertThatVariable( valueMap.get( "incident_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( valueMap.get( "tei_count" ) ).hasValue( "1" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "1" );
@@ -575,14 +575,14 @@ public void ruleEnrollmentValuesShouldBePropagatedToMapCorrectly()
assertThat( valueMap.size() ).isEqualTo( 15 );
assertThatVariable( valueMap.get( "current_date" ) ).hasValue( wrap( currentDate ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( currentDate );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( currentDate );
assertThatVariable( valueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
assertThatVariable( valueMap.get( "enrollment_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( valueMap.get( "enrollment_id" ) ).hasValue( "test_enrollment" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_enrollment" );
@@ -592,7 +592,7 @@ public void ruleEnrollmentValuesShouldBePropagatedToMapCorrectly()
assertThatVariable( valueMap.get( "incident_date" ) )
.hasValue( wrap( dateFormat.format( incidentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( incidentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( incidentDate ) );
assertThatVariable( valueMap.get( "tei_count" ) ).hasValue( "1" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "1" );
@@ -656,14 +656,14 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
// Enrollment
assertThatVariable( enrollmentValueMap.get( "current_date" ) ).hasValue( wrap( currentDate ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( currentDate );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( currentDate );
assertThatVariable( enrollmentValueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
assertThatVariable( enrollmentValueMap.get( "enrollment_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( enrollmentValueMap.get( "enrollment_id" ) ).hasValue( "test_enrollment" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_enrollment" );
@@ -673,7 +673,7 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
assertThatVariable( enrollmentValueMap.get( "incident_date" ) )
.hasValue( wrap( dateFormat.format( incidentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( incidentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( incidentDate ) );
assertThatVariable( enrollmentValueMap.get( "tei_count" ) ).hasValue( "1" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "1" );
@@ -686,14 +686,14 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
// Event one
assertThatVariable( eventOneValueMap.get( "current_date" ) ).hasValue( wrap( currentDate ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( currentDate );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( currentDate );
assertThatVariable( eventOneValueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
assertThatVariable( eventOneValueMap.get( "enrollment_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( eventOneValueMap.get( "enrollment_id" ) ).hasValue( "test_enrollment" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_enrollment" );
@@ -703,7 +703,7 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
assertThatVariable( eventOneValueMap.get( "incident_date" ) )
.hasValue( wrap( dateFormat.format( incidentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( incidentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( incidentDate ) );
assertThatVariable( eventOneValueMap.get( "tei_count" ) ).hasValue( "1" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "1" );
@@ -716,22 +716,22 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
assertThatVariable( eventOneValueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( eventOneDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventOneDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventOneDate ) );
assertThatVariable( eventOneValueMap.get( "due_date" ) )
.hasValue( wrap( dateFormat.format( eventOneDueDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventOneDueDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventOneDueDate ) );
// Event two
assertThatVariable( eventTwoValueMap.get( "current_date" ) ).hasValue( wrap( currentDate ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( currentDate );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( currentDate );
assertThatVariable( eventTwoValueMap.get( "event_count" ) ).hasValue( "2" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "2" );
assertThatVariable( eventTwoValueMap.get( "enrollment_date" ) )
.hasValue( wrap( dateFormat.format( enrollmentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( enrollmentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( enrollmentDate ) );
assertThatVariable( eventTwoValueMap.get( "enrollment_id" ) ).hasValue( "test_enrollment" )
.isTypeOf( RuleValueType.TEXT ).hasCandidates( "test_enrollment" );
@@ -741,7 +741,7 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
assertThatVariable( eventTwoValueMap.get( "incident_date" ) )
.hasValue( wrap( dateFormat.format( incidentDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( incidentDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( incidentDate ) );
assertThatVariable( eventTwoValueMap.get( "tei_count" ) ).hasValue( "1" )
.isTypeOf( RuleValueType.NUMERIC ).hasCandidates( "1" );
@@ -754,11 +754,11 @@ RuleEvent.Status.ACTIVE, eventTwoDate, new Date(), eventTwoDueDate, "", null, ne
assertThatVariable( eventTwoValueMap.get( "event_date" ) )
.hasValue( wrap( dateFormat.format( eventTwoDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventTwoDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventTwoDate ) );
assertThatVariable( eventTwoValueMap.get( "due_date" ) )
.hasValue( wrap( dateFormat.format( eventTwoDueDate ) ) )
- .isTypeOf( RuleValueType.TEXT ).hasCandidates( dateFormat.format( eventTwoDueDate ) );
+ .isTypeOf( RuleValueType.DATE ).hasCandidates( dateFormat.format( eventTwoDueDate ) );
}
@Test( expected = IllegalStateException.class )