Search in sources :

Example 46 with User

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

the class GridDemo method onActionFromSetup.

@CommitAfter
@PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT)
void onActionFromSetup() {
    userDAO.deleteAll();
    for (int i = 1; i <= 20; i++) {
        final User user = new User();
        final String suffix = String.valueOf(i);
        user.setFirstName("Joe_" + suffix);
        user.setLastName("User");
        user.setEncodedPassword("####");
        user.setEmail("joe" + suffix + "@null.com");
        entityManager.persist(user);
    }
}
Also used : User(org.example.app6.entities.User) PersistenceContext(javax.persistence.PersistenceContext) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 47 with User

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

the class Index method onActionFromCommitAfter.

Object onActionFromCommitAfter() {
    final User user = new User();
    user.setFirstName("Diane");
    userDAO.add(user);
    commitAfterDemo.setUser(user);
    return commitAfterDemo;
}
Also used : User(org.example.app6.entities.User)

Example 48 with User

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

the class PersistEntity method onCreateEntity.

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

Example 49 with User

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

the class GridDemo method onActionFromSetup.

@CommitAfter
@PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT)
void onActionFromSetup() {
    userDAO.deleteAll();
    for (int i = 1; i <= 20; i++) {
        final User user = new User();
        final String suffix = String.valueOf(i);
        user.setFirstName("Joe_" + suffix);
        user.setLastName("User");
        user.setEncodedPassword("####");
        user.setEmail("joe" + suffix + "@null.com");
        entityManager.persist(user);
    }
}
Also used : User(org.example.app1.entities.User) PersistenceContext(javax.persistence.PersistenceContext) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 50 with User

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

the class Index method onActionFromCommitAfter.

Object onActionFromCommitAfter() {
    final User user = new User();
    user.setFirstName("Diane");
    userDAO.add(user);
    commitAfterDemo.setUser(user);
    return commitAfterDemo;
}
Also used : User(org.example.app1.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