Add documentation to test data Factory methods
This commit is contained in:
parent
e7d6698c11
commit
167a73fb01
@ -1,12 +1,46 @@
|
|||||||
package se.su.dsv.scipro.testdata;
|
package se.su.dsv.scipro.testdata;
|
||||||
|
|
||||||
|
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||||
import se.su.dsv.scipro.system.User;
|
import se.su.dsv.scipro.system.User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A factory to help with repetitive tasks when populating test data.
|
* A factory to help with repetitive tasks when populating test data.
|
||||||
*/
|
*/
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
|
/**
|
||||||
|
* Creates a user with the given first name and last name "Student".
|
||||||
|
* The user is given the role {@link Roles#AUTHOR}.
|
||||||
|
* <p>
|
||||||
|
* A username is created of the form {@code <first_name>@example.com} that
|
||||||
|
* can be used to log in.
|
||||||
|
*/
|
||||||
User createAuthor(String firstName);
|
User createAuthor(String firstName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a user with the given first name and last name "Employee".
|
||||||
|
* <p>
|
||||||
|
* The user is given the role {@link Roles#SUPERVISOR}, {@link Roles#REVIEWER},
|
||||||
|
* and {@link Roles#EXAMINER}.
|
||||||
|
* <p>
|
||||||
|
* The user gets a default research area, unit, and language. It is also
|
||||||
|
* marked as {@link User#setActiveAsSupervisor(boolean) an active supervisor}.
|
||||||
|
* <p>
|
||||||
|
* A username is created of the form {@code <first_name>@example.com} that
|
||||||
|
* can be used to log in.
|
||||||
|
*/
|
||||||
User createSupervisor(String firstName);
|
User createSupervisor(String firstName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a user with the given first name and last name "Employee".
|
||||||
|
* <p>
|
||||||
|
* The user is given the role {@link Roles#SUPERVISOR}, {@link Roles#REVIEWER},
|
||||||
|
* and {@link Roles#EXAMINER}.
|
||||||
|
* <p>
|
||||||
|
* The user gets a default research area, unit, and language. It is also
|
||||||
|
* marked as {@link User#setActiveAsSupervisor(boolean) an active supervisor}.
|
||||||
|
* <p>
|
||||||
|
* A username is created of the form {@code <first_name>@example.com} that
|
||||||
|
* can be used to log in.
|
||||||
|
*/
|
||||||
User createReviewer(String firstName);
|
User createReviewer(String firstName);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user