Package com.github.hipchat.api

Examples of com.github.hipchat.api.User


    @Test
    public void testCreateAndDeleteUser()
    {
        HipChat hipchat = new HipChat(HIPCHAT_KEY);
        User user = hipchat.createUser("test@unittest.com", "Test McTester", "UnitTestUser", false, "ch4ngeM3", (TimeZone) null);
        assertNotNull(user);
        assertTrue(hipchat.deleteUser(user));
    }
View Full Code Here


    @Test
    public void testGetUser()
    {
        HipChat hipchat = new HipChat(HIPCHAT_KEY);
        UserId id = UserId.create(TEST_ROOM_OWNER);
        User user = hipchat.getUser(id);

        assertNotNull(user);
        assertEquals(user, id);
    }
View Full Code Here

    @Test
    public void testUpdateUser()
    {
        HipChat hipchat = new HipChat(HIPCHAT_KEY);
        UserId id = UserId.create(TEST_ROOM_OWNER);
        User user = hipchat.getUser(id);

        assertNotNull(user);
        assertEquals(user, id);

        String existingTitle = user.getTitle();

        user = hipchat.updateUser(user, null, null, "Temporary Tester", user.isGroupAdmin(), null, null);

        assertEquals("Temporary Tester", user.getTitle());

        user = hipchat.updateUser(user, null, null, existingTitle, user.isGroupAdmin(), null, null);
    }
View Full Code Here

TOP

Related Classes of com.github.hipchat.api.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.