Hi ALL,

Here is several test cases:

facts feeded: 5 Students.

1.
When
 Student(examDate == null);
Then
 println("..");
 <expected>: one line printed out
 <result>: one line printed out

2.
When
 Student($startDate : startDate ->(utilService.dateWithin($startDate,(new
Date()),7, utilService.UNIT_DAY)))
Then
 println("...")
<expected>: three lines printed out
<result>: three lines printed out

3.
when
 (Student(examDate == null)  and  Student($startDate : startDate ->(
utilService.dateWithin($startDate,(new Date()),7, utilService.UNIT_DAY))))
then
 println("...")
<expected>: one line printed out
<result>: three lines printed out(same as scenario 2)

4.
when
$s : (Student(examDate == null)  and  Student($startDate : startDate ->(
utilService.dateWithin($startDate,(new Date()),7, utilService.UNIT_DAY))))
then
 println($s.get....)

At scenario 4, it should assign the Student which meet all columns to $s.
right?

Could anyone help explain how to make 'AND' work as expected?

Thanks
Best Regards
Weily

Reply via email to