Package hudson.model

Examples of hudson.model.User.addProperty()


        publisher.replyTo = "ashlux@gmail.com";

        User u = User.get("kutzi");
        u.setFullName("Christoph Kutzinski");
        Mailer.UserProperty prop = new Mailer.UserProperty("kutzi@xxx.com");
        u.addProperty(prop);

        UserCause cause = new MockUserCause("kutzi");

        FreeStyleBuild build = project.scheduleBuild2(0, cause).get();
        j.assertBuildStatusSuccess(build);
View Full Code Here


        publisher.getConfiguredTriggers().add(successTrigger);

        User u = User.get("kutzi");
        u.setFullName("Christoph Kutzinski");
        Mailer.UserProperty prop = new Mailer.UserProperty("kutzi@xxx.com");
        u.addProperty(prop);

        UserCause cause = new MockUserCause("kutzi");

        FreeStyleBuild build = project.scheduleBuild2(0, cause).get();
        j.assertBuildStatusSuccess(build);
View Full Code Here

            return null;
        }

        // register the user
        User user = createAccount(si.username,si.password1);
        user.addProperty(new Mailer.UserProperty(si.email));
        user.setFullName(si.fullname);
        user.save();
        return user;
    }
View Full Code Here

    /**
     * Creates a new user account by registering a password to the user.
     */
    public User createAccount(String userName, String password) throws IOException {
        User user = User.get(userName);
        user.addProperty(Details.fromPlainPassword(password));
        return user;
    }

    /**
     * This is used primarily when the object is listed in the breadcrumb, in the user management screen.
View Full Code Here

        }

        // set email address for user if needed
        if (fixEmpty(csAuthorEmail) != null) {
            try {
                user.addProperty(new Mailer.UserProperty(csAuthorEmail));
            } catch (IOException e) {
                LOGGER.log(Level.FINEST, "Failed to add email to user properties.", e);
            }
        }
        return user;
View Full Code Here

    public void testFindOrCreateUserBasedOnEmail() throws IOException {
        mockStatic(User.class);
        User user = createMock(User.class);
        user.setFullName(AUTHOR_NAME);
        user.save();
        user.addProperty(EasyMock.<UserProperty>anyObject());
        expect(User.get(AUTHOR_EMAIL, true)).andReturn(user);
        replay(User.class, user);
        GitChangeSet changeSet = new GitChangeSet(new ArrayList<String>(), true);
        changeSet.findOrCreateUser(AUTHOR_NAME, AUTHOR_EMAIL, true);
        verify(User.class, user);
View Full Code Here

    @Test
    public void testFindOrCreateUserBasedOnName() throws IOException {
        mockStatic(User.class);
        User user = createMock(User.class);
        user.addProperty(EasyMock.<UserProperty>anyObject());
        expect(User.get(AUTHOR_NAME, true)).andReturn(user);
        replay(User.class, user);
        GitChangeSet changeSet = new GitChangeSet(new ArrayList<String>(), false);
        changeSet.findOrCreateUser(AUTHOR_NAME, AUTHOR_EMAIL, false);
        verify(User.class, user);
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.