I have been given a task to create pre and post conditions for an operation:
getInformation(givenTitle:String):Integer
The operation should return a number of all bug reports for a project of a specified title. As for the pre conditions i have figured out the following:
context Company::getInformation(givenTitle:String):Integer
pre: has->size() > 0 and has->exists(title = givenTitle);
Yet I have a big problem how to handle the aggregation of artifacts in projects
If it was just an association I would do the following:
post: has->select(title = givenTitle)->first().Artifact.relatedTo->size() = result;
But I don't know how to handle the aggregation, and i can't seem to find any useful information about that on google.