Package net.paoloambrosio.model

Examples of net.paoloambrosio.model.User


    @Autowired
    private UserRepository userRepository;

    @Test
    public void somethingMeaningful() {
        User user = make(a(TestUser));
        userRepository.save(user);
        assertEquals(1, userRepository.findAll().size());

        Message message = make(a(TestMessage, with(author, user)));
        messageRepository.save(message);
View Full Code Here


        assertEquals(1, messageRepository.findAll().size());
    }

    @Test
    public void somethingNotSoMuch() {
        User user = make(a(TestUser));
        userRepository.save(user);

        messageRepository.save(make(a(TestMessage, with(author, user))));
        assertEquals(1, messageRepository.findByAuthor(user.getUsername()).size());

        messageRepository.save(make(a(TestMessage, with(author, user))));
        messageRepository.save(make(a(TestMessage, with(author, user))));
        assertEquals(3, messageRepository.findByAuthor(user.getUsername()).size());
    }
View Full Code Here

TOP

Related Classes of net.paoloambrosio.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.