Search in sources :

Example 76 with User

use of com.laurentiuspilca.ssc6.entities.User in project 2021-msk-food-delivery by netcracker-edu.

the class UserUtils method createUser.

public static User createUser(Long id, String fullName, String email, Role role) {
    User user = new User();
    user.setId(id);
    user.setFullName(fullName);
    user.setEmail(email);
    user.setRole(role);
    // "password" hashed
    user.setPassword("$2a$08$1h5twwivIL7O9gyjIJ/9eO4I2BeSytSpjsbpaPN.dxWSJM0fuWBBm");
    return user;
}
Also used : User(com.ncedu.fooddelivery.api.v1.entities.User)

Example 77 with User

use of com.laurentiuspilca.ssc6.entities.User in project tapestry-5 by apache.

the class SSOEntity method onPersistEntity.

void onPersistEntity() {
    final User user = new User();
    user.setFirstName("name");
    userDAO.add(user);
    this.user = user;
}
Also used : User(org.example.app1.entities.User)

Example 78 with User

use of com.laurentiuspilca.ssc6.entities.User in project tapestry-5 by apache.

the class EncodeEntities method onCreate.

@CommitAfter
@PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT)
void onCreate() {
    final User user = new User();
    user.setFirstName("name");
    entityManager.persist(user);
}
Also used : User(org.example.app1.entities.User) PersistenceContext(javax.persistence.PersistenceContext) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 79 with User

use of com.laurentiuspilca.ssc6.entities.User in project tapestry-5 by apache.

the class PersistEntity method onCreateEntity.

void onCreateEntity() {
    User user = new User();
    user.setFirstName("name");
    userDAO.add(user);
    this.user = user;
}
Also used : User(org.example.app0.entities.User)

Example 80 with User

use of com.laurentiuspilca.ssc6.entities.User in project tapestry-5 by apache.

the class SSOEntity method onPersistEntity.

void onPersistEntity() {
    User user = new User();
    user.setFirstName("name");
    userDAO.add(user);
    this.user = user;
}
Also used : User(org.example.app0.entities.User)

Aggregations

User (com.ncedu.fooddelivery.api.v1.entities.User)58 Test (org.junit.jupiter.api.Test)49 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)49 File (com.ncedu.fooddelivery.api.v1.entities.File)18 MockMultipartFile (org.springframework.mock.web.MockMultipartFile)18 MultipartFile (org.springframework.web.multipart.MultipartFile)18 Path (java.nio.file.Path)16 FileLinkDTO (com.ncedu.fooddelivery.api.v1.dto.file.FileLinkDTO)12 UserInfoDTO (com.ncedu.fooddelivery.api.v1.dto.user.UserInfoDTO)9 BufferedImage (java.awt.image.BufferedImage)8 CommitAfter (org.apache.tapestry5.jpa.annotations.CommitAfter)7 AlreadyExistsException (com.ncedu.fooddelivery.api.v1.errors.badrequest.AlreadyExistsException)6 PasswordsMismatchException (com.ncedu.fooddelivery.api.v1.errors.badrequest.PasswordsMismatchException)6 PersistenceContext (javax.persistence.PersistenceContext)6 User (org.example.app0.entities.User)6 User (org.example.app1.entities.User)6 User (org.example.app6.entities.User)5 EmailChangeDTO (com.ncedu.fooddelivery.api.v1.dto.user.EmailChangeDTO)4 PasswordChangeDTO (com.ncedu.fooddelivery.api.v1.dto.user.PasswordChangeDTO)4 IOException (java.io.IOException)4