@Valid has been specified in Resource::getCriterionSatisfactions. A test case has been added to verify a validation constraint is generated when a resource containing a criterion satisfaction without start date is being imported with the REST service (@Valid annotation is necessary).
40 lines
1.5 KiB
XML
40 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
|
<resource-list xmlns="http://rest.ws.navalplanner.org">
|
|
|
|
<!-- *** Machines *** -->
|
|
<!-- OK -->
|
|
<machine code=" m1 " name="m1-name" description="m1-desc"/>
|
|
<!-- Missing code and name (description is optional). -->
|
|
<machine code="" description=""/>
|
|
|
|
<!-- *** Workers *** -->
|
|
<!-- OK -->
|
|
<worker first-name="w1-firstName" surname="w1-surname" nif=" w1-nif ">
|
|
<criterion-satisfaction-list>
|
|
<criterion-satisfaction
|
|
criterion-type-name=" WORK_RELATIONSHIP "
|
|
criterion-name=" hiredResourceWorkingRelationship "
|
|
start-date="2009-01-01"
|
|
finish-date=""/>
|
|
<criterion-satisfaction
|
|
criterion-type-name="LEAVE"
|
|
criterion-name="paternityLeave"
|
|
start-date="2009-12-24"
|
|
finish-date="2009-12-25"/>
|
|
</criterion-satisfaction-list>
|
|
</worker>
|
|
<!-- Missing first name, surname, and nif. -->
|
|
<worker first-name="" nif=""/>
|
|
|
|
<!-- Missing start date in criterion satisfaction. -->
|
|
<worker first-name="w2-firstName" surname="w2-surname" nif=" w2-nif ">
|
|
<criterion-satisfaction-list>
|
|
<criterion-satisfaction
|
|
criterion-type-name="LEAVE"
|
|
criterion-name="paternityLeave"
|
|
finish-date="2009-12-25"/>
|
|
</criterion-satisfaction-list>
|
|
</worker>
|
|
|
|
</resource-list>
|