Package org.internna.ossmoney.model.security

Examples of org.internna.ossmoney.model.security.UserDetails


    }

    @Test
    public void testBelongsTo() {
        Account account = new Account();
        UserDetails user = new UserDetails();
        user.setUsername("foouser");
        assertFalse("Null user", account.belongsTo(null));
        assertFalse("Account without owner", account.belongsTo(user));
        account.setOwner(user);
        assertTrue("Account owner", account.belongsTo(user));
    }
View Full Code Here


        assertEquals("Transactions for the end of November", 2, transactions.size());
    }

    @Test
    public void testGetOpenAccounts() {
        UserDetails user = UserDetails.findUserDetailsByUsername("admin");
        assertEquals("Null user", 0, Account.findOpenAccounts(null).size());
        assertEquals("Admin user", 0, Account.findOpenAccounts(user).size());
        user = UserDetails.findUserDetailsByUsername("jose");
        assertEquals("A user with open accounts", 3, Account.findOpenAccounts(user).size());
    }
View Full Code Here

@TransactionConfiguration(defaultRollback = true)
public class PayeeIntegrationTest {

    @Test
    public void testFindByOwner() {
      UserDetails user = UserDetails.findUserDetails(1L);
      Integer payees = Payee.findByOwner(user).size();
      Payee payee = new Payee();
      payee.setOwner(user);
      payee.setName("someone");
      payee.persist();
View Full Code Here

TOP

Related Classes of org.internna.ossmoney.model.security.UserDetails

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.