CSC/ECE 517 Spring 2013/OSS E608: Difference between revisions
(Created page with "E608. Refactoring and Testing - Course Classes: *models/course.rb (76 lines) *models/course_participant.rb (94 lines) *models/course_team.rb (116 lines) *models/course_node.rb (9...") |
No edit summary |
||
Line 1: | Line 1: | ||
E608. Refactoring and Testing - Course | E608. Refactoring and Testing - Course | ||
Classes: | Classes: | ||
*models/course.rb (76 lines) | *models/course.rb (76 lines) | ||
Line 6: | Line 7: | ||
*models/course_node.rb (95 lines) | *models/course_node.rb (95 lines) | ||
What it does: Involves creation and management of courses in Expertiza | What it does: | ||
What needs to be done | Involves creation and management of courses in Expertiza | ||
What needs to be done: | |||
It is not clear what a method named 'create_node' is doing in the 'course' class. Refactor by renaming this method appropriately. | It is not clear what a method named 'create_node' is doing in the 'course' class. Refactor by renaming this method appropriately. | ||
In the course_team class the import method seems to be doing too many things. See if this method can be broken down into smaller methods with specific functionality. | In the course_team class the import method seems to be doing too many things. See if this method can be broken down into smaller methods with specific functionality. |
Revision as of 22:50, 8 March 2013
E608. Refactoring and Testing - Course
Classes:
- models/course.rb (76 lines)
- models/course_participant.rb (94 lines)
- models/course_team.rb (116 lines)
- models/course_node.rb (95 lines)
What it does: Involves creation and management of courses in Expertiza
What needs to be done: It is not clear what a method named 'create_node' is doing in the 'course' class. Refactor by renaming this method appropriately. In the course_team class the import method seems to be doing too many things. See if this method can be broken down into smaller methods with specific functionality. The 'get' method in course_node.rb appears to be doing a lot. Refactor this method by breaking it up into smaller methods. Look for any unused methods or variables in these files. Also apply other refactorings such as Rename variable, Rename method to give the variables and methods more meaningful names. Write unit tests for all the methods in each of the listed model classes.