Modeling Framework II Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
Announcements § Assignment 05 (Quiz about Metrics) is due Today (November 23, 11:59 PM) 10 questions about metrics § Assignment 06 (Eclipse Modeling Framework) open today, and it is due December 1, 11:59 PM. Use EMF for a Simple Project § Quiz 06 (Software Design) open today, and it is due December 1, 11:59 PM A set of question about Patterns, Class diagrams and programming. Some of these questions could be in your final exam
Announcements § November 23. Eclipse Modeling Framework II § November 25. Final Review § November 27. Thanksgiving Weekend § November 30. No lecture that day § December 02. Final Exam (during the lecture starting time 9:40 am)
Announcements § Questions about assignments and grade write to the TA § Use your ASU email § Mention CSE 460 § Be specific in your question(s). § I have an appeal… (my assignment grade is wrong) ... Etc. is not the same that I have a question... § Please do not request unjustified increment in final grade (see Lecture 1)
Test Cases § Generated test class for all the entities of your model. § Add methods starting with “test” to create single test cases. § Run test cases with a right-click on the test class then. “Debug As” => “JUnit Test”. In this context, test cases are very simple way of exploring and using the API of the generated classes.
Test Cases § Use the MyModelFactory to create a Course and a Student public class CourseTest extends TestCase { // original code... public void testCourseStudentReference() { Course course = MyModelFactory.eINSTANCE.createCourse(); Student s1 = MyModelFactory.eINSTANCE.createStudent(); course.getStudents().add(s1); assertEquals(course.getStudents().get(0), s1); } }
Assignment 06 UML Class Diagram 1. Define the Model in EMF (take a screen shoot) 2. Generate Code (take a screen shoot) 3. Use the Code to Create a Class Diagram (only the Model package but include both interfaces and implementations). It will be bigger and more complex that the one provided 1. Create a test case to create (using the factory) one instance of each class EMF (take a screen shoot) 2. Run it (take a screen shoot)