Package com.heroku.api.request.key

Examples of com.heroku.api.request.key.KeyList


    /**
     * Get a list of keys associated with the current user's account.
     * @return
     */
    public List<Key> listKeys() {
        return connection.execute(new KeyList(), apiKey);
    }
View Full Code Here



    @Test
    @SuppressWarnings("unchecked")
    public void asyncTests() {
        Promise<List<Key>> jsonArrayResponseFuture = connection.executeAsync(new KeyList(), apiKey);
        List<Key> keys = jsonArrayResponseFuture.await(10L, TimeUnit.SECONDS).get();
        assertNotNull(keys);
    }
View Full Code Here

    }

    @Test(dataProvider = "publicKey")
    public void testKeyListCommand(String pubKey, String comment) {
        connection.execute(new KeyAdd(pubKey), API_KEY);
        KeyList keyListRequest = new KeyList();
        List<Key> keyListResponse = connection.execute(keyListRequest, API_KEY);
        Assert.assertTrue(keyIsPresent(comment, keyListResponse), comment + " should have been present.");
    }
View Full Code Here

        publicKeyOutputStream.close();
        return new String(publicKeyOutputStream.toByteArray());
    }

    public boolean keyIsPresent(String comment) {
        return keyIsPresent(comment, connection.execute(new KeyList(), API_KEY));
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.request.key.KeyList

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.