|
|
@ -4,6 +4,7 @@ import info.bukova.isspst.DateTimeUtils;
|
|
|
|
import info.bukova.isspst.StringUtils;
|
|
|
|
import info.bukova.isspst.StringUtils;
|
|
|
|
import info.bukova.isspst.data.Invoicing;
|
|
|
|
import info.bukova.isspst.data.Invoicing;
|
|
|
|
import info.bukova.isspst.data.Requirement;
|
|
|
|
import info.bukova.isspst.data.Requirement;
|
|
|
|
|
|
|
|
import info.bukova.isspst.data.User;
|
|
|
|
import info.bukova.isspst.data.Workgroup;
|
|
|
|
import info.bukova.isspst.data.Workgroup;
|
|
|
|
|
|
|
|
|
|
|
|
import org.hamcrest.Description;
|
|
|
|
import org.hamcrest.Description;
|
|
|
@ -48,8 +49,9 @@ public class InvoicingFilter implements Filter<Invoicing>
|
|
|
|
boolean foundReqDate = DateTimeUtils.isEqualByDateForFilter(item.getRequirement().getReqDate(), condition.getRequirement().getReqDate());
|
|
|
|
boolean foundReqDate = DateTimeUtils.isEqualByDateForFilter(item.getRequirement().getReqDate(), condition.getRequirement().getReqDate());
|
|
|
|
boolean foundCenter = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getCentre(), condition.getRequirement().getCentre());
|
|
|
|
boolean foundCenter = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getCentre(), condition.getRequirement().getCentre());
|
|
|
|
boolean foundWorkgroup = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getWorkgroup(), condition.getRequirement().getWorkgroup());
|
|
|
|
boolean foundWorkgroup = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getWorkgroup(), condition.getRequirement().getWorkgroup());
|
|
|
|
|
|
|
|
boolean foundUser = User.isEqualByUserForFilter(item.getRequirement().getOwnedBy(), condition.getRequirement().getOwnedBy());
|
|
|
|
boolean foundDescription = StringUtils.isEqualForFilter(item.getRequirement().getDescription(), condition.getRequirement().getDescription());
|
|
|
|
boolean foundDescription = StringUtils.isEqualForFilter(item.getRequirement().getDescription(), condition.getRequirement().getDescription());
|
|
|
|
return (foundNumser && foundReqDate && foundCenter && foundDescription && foundWorkgroup);
|
|
|
|
return (foundNumser && foundReqDate && foundCenter && foundDescription && foundWorkgroup && foundUser);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Factory
|
|
|
|
@Factory
|
|
|
|