public final class UsersDataset extends Object
User entities. This
dataset is replicated in the user*.xml dataset files.| Modifier and Type | Method and Description |
|---|---|
static es.uvigo.esei.dgss.letta.domain.entities.User |
adminUser()
Returns an user whose role is ADMIN
|
static String |
existentLogin()
Returns the login of a user that should exist in the database.
|
static es.uvigo.esei.dgss.letta.domain.entities.User |
existentUser()
Returns an user that should exist in the database.
|
static String |
md5OfPassword(String password)
Returns the MD5 of a password.
|
static es.uvigo.esei.dgss.letta.domain.entities.User |
newUser()
Returns an user that should not exist in the database and that may be
used to create a new user.
|
static es.uvigo.esei.dgss.letta.domain.entities.User |
nonExistentUser()
Returns an user that should not exist in the database.
|
static String |
passwordFor(String login)
Returns the plain password for a given user's login.
|
static String |
passwordFor(es.uvigo.esei.dgss.letta.domain.entities.User user)
Returns the plain password for a given user.
|
static es.uvigo.esei.dgss.letta.domain.entities.User[] |
users()
A list of five users that should exists in the database.
|
static es.uvigo.esei.dgss.letta.domain.entities.User[] |
usersWithout(String... logins)
Returns the
users() list of users without the users with the
provided logins. |
static es.uvigo.esei.dgss.letta.domain.entities.User |
userWithLogin(String login)
Returns a user from the
users() list with the provided login. |
public static es.uvigo.esei.dgss.letta.domain.entities.User[] users()
| Login | Password | |
|---|---|---|
| john | johnpass | john@email.com |
| anne | annepass | anne@email.com |
| mary | marypass | mary@email.com |
| joan | joanpass | joan@email.com |
| mike | mikepass | mike@email.com |
public static es.uvigo.esei.dgss.letta.domain.entities.User[] usersWithout(String... logins)
users() list of users without the users with the
provided logins.logins - a list of logins of the users to be excluded from the
returned values.users() list of users without the users with the
provided logins.public static es.uvigo.esei.dgss.letta.domain.entities.User userWithLogin(String login)
users() list with the provided login.login - the login of the user to be returned.users() list with the provided login.IllegalArgumentException - if there is not any user with the
provided login.public static String md5OfPassword(String password)
password - a password to be converted into MD5.null otherwise.public static String passwordFor(es.uvigo.esei.dgss.letta.domain.entities.User user)
user - the user whose password will be returned.public static String passwordFor(String login)
login - the login of the user whose password will be returned.public static String existentLogin()
existentUser().public static es.uvigo.esei.dgss.letta.domain.entities.User existentUser()
public static es.uvigo.esei.dgss.letta.domain.entities.User adminUser()
public static es.uvigo.esei.dgss.letta.domain.entities.User nonExistentUser()
public static es.uvigo.esei.dgss.letta.domain.entities.User newUser()
Copyright © 2015. All rights reserved.