Storyboard POCreatorLargeModel
Start: At first we instanciate a Model
University university = new University().withName("StudyRight University"); Room mathRoom = university.createRooms().withCredits(6).withName("Multiply").withTopic("Math"); Student joan = mathRoom.createStudents().withName("Jane Doe"); Student peter = mathRoom.createStudentsTeachingAssistant().withName("Peter Teacher").withIn(mathRoom); mathRoom.createAssignments().withContent("1*1").withPoints(2).withStudents(joan); university.withStudents(joan, peter);
Step 1: Now the corresponding Pattern is generated
POCreator poCreator = new POCreator(); PatternObject po = poCreator .createPO(university);
Step 2: Now we want to rebind the patternObject to the University model and look for the matches
po.rebind(university);
Check: The PatternObject has a match true
Check: The University is the Match of the PatternObject StudyRight University actual StudyRight University
Check: The Pattern contains as many PatternObjects as Objects were created in the University Model 5 actual 5