CSC/ECE 517 Fall 2018/E1852 Unit Test for Participant Model: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''CSC/ECE 517 Fall 2018/E1852 Unit Test Participant Model''' | |||
__TOC__ | |||
== About Expertiza == | |||
== '''Test Cases''' == | |||
''' TASKS IDENTIFIED''' | ''' TASKS IDENTIFIED''' | ||
Line 9: | Line 14: | ||
A Participant can be a member of a Team. When team method is called on a Participant, it should return the Team it belongs to. | A Participant can be a member of a Team. When team method is called on a Participant, it should return the Team it belongs to. | ||
'''Test responses''' | '''Test responses''' | ||
Line 25: | Line 22: | ||
A Participant is a User. When name method is called on a Participant, it should return the name of this User. | A Participant is a User. When name method is called on a Participant, it should return the name of this User. | ||
'''Test fullname''' | '''Test fullname''' | ||
A Participant is a User. When fullname method is called on a Participant, it should return the full name of this User. | A Participant is a User. When fullname method is called on a Participant, it should return the full name of this User. | ||
'''Test topic_name''' | |||
When a Participant is a User associated with an Assignment, it can have a Topic assigned to its Assignment. When topic_name method is called on a Participant, it should return the name of its Topic. If a Topic is not assigned or has no name, it should return an error message. | |||
'''Test handle''' | '''Test handle''' | ||
Line 36: | Line 36: | ||
'''Test force_delete''' | '''Test force_delete''' | ||
'''Test able_to_review''' | '''Test able_to_review''' | ||
Line 49: | Line 47: | ||
When scores method is called on a Participant, it should return the total scores it received for a given number of questions. | When scores method is called on a Participant, it should return the total scores it received for a given number of questions. | ||
'''Test get_permissions''' | '''Test self.get_permissions''' | ||
'''Test get_authorization''' | '''Test get_authorization''' | ||
'''Test sort_by_name''' | '''Test self.sort_by_name''' | ||
Participants are Users. When self.sort_by_name method is called on a Participant, it should sort a given set of participants based on their usernames. | Participants are Users. When self.sort_by_name method is called on a Participant, it should sort a given set of participants based on their usernames. |
Revision as of 20:40, 2 November 2018
CSC/ECE 517 Fall 2018/E1852 Unit Test Participant Model
About Expertiza
Test Cases
TASKS IDENTIFIED
Test team
A Participant can be a member of a Team. When team method is called on a Participant, it should return the Team it belongs to.
Test responses
A Participant has many ResponseMaps that map a connection between this participant as a reviewer and as a reviewee. Each ResponseMap has many Responses associated with it. When responses method is called on a Participant, it should return an array of responses associated to this Participant.
Test name
A Participant is a User. When name method is called on a Participant, it should return the name of this User.
Test fullname
A Participant is a User. When fullname method is called on a Participant, it should return the full name of this User.
Test topic_name
When a Participant is a User associated with an Assignment, it can have a Topic assigned to its Assignment. When topic_name method is called on a Participant, it should return the name of its Topic. If a Topic is not assigned or has no name, it should return an error message.
Test handle
Test delete
Test force_delete
Test able_to_review
When able_to_review method is called on a Participant, it should return true if it can review and false otherwise.
Test email
Test scores
When scores method is called on a Participant, it should return the total scores it received for a given number of questions.
Test self.get_permissions
Test get_authorization
Test self.sort_by_name
Participants are Users. When self.sort_by_name method is called on a Participant, it should sort a given set of participants based on their usernames.