Package org.b3log.solo.repository

Examples of org.b3log.solo.repository.UserRepository.beginTransaction()


        another.put(User.USER_PASSWORD, "pass1");
        another.put(User.USER_ROLE, Role.DEFAULT_ROLE);
        another.put(UserExt.USER_ARTICLE_COUNT, 0);
        another.put(UserExt.USER_PUBLISHED_ARTICLE_COUNT, 0);

        Transaction transaction = userRepository.beginTransaction();
        userRepository.add(another);
        transaction.commit();

        Assert.assertNull(userRepository.getAdmin());
View Full Code Here


        admin.put(User.USER_PASSWORD, "pass");
        admin.put(User.USER_ROLE, Role.ADMIN_ROLE);
        admin.put(UserExt.USER_ARTICLE_COUNT, 0);
        admin.put(UserExt.USER_PUBLISHED_ARTICLE_COUNT, 0);

        transaction = userRepository.beginTransaction();
        userRepository.add(admin);
        transaction.commit();

        Assert.assertTrue(userRepository.isAdminEmail("test@gmail.com"));
        Assert.assertFalse(userRepository.isAdminEmail("notFound@gmail.com"));
View Full Code Here

        another.put(User.USER_URL, "http://b3log.org");
        another.put(User.USER_ROLE, Role.DEFAULT_ROLE);
        another.put(UserExt.USER_ARTICLE_COUNT, 0);
        another.put(UserExt.USER_PUBLISHED_ARTICLE_COUNT, 0);

        Transaction transaction = userRepository.beginTransaction();
        userRepository.add(another);
        transaction.commit();

        Assert.assertNull(userRepository.getAdmin());
View Full Code Here

        admin.put(User.USER_URL, "http://b3log.org");
        admin.put(User.USER_ROLE, Role.ADMIN_ROLE);
        admin.put(UserExt.USER_ARTICLE_COUNT, 0);
        admin.put(UserExt.USER_PUBLISHED_ARTICLE_COUNT, 0);

        transaction = userRepository.beginTransaction();
        userRepository.add(admin);
        transaction.commit();

        Assert.assertTrue(userRepository.isAdminEmail("test@gmail.com"));
        Assert.assertFalse(userRepository.isAdminEmail("notFound@gmail.com"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.