Package com.heroku.api.request.addon

Examples of com.heroku.api.request.addon.AddonList


    /**
     * Get a list of all addons available. Refer to http://addons.heroku.com for more information about addons.
     * @return
     */
    public List<Addon> listAllAddons() {
        return connection.execute(new AddonList(), apiKey);
    }
View Full Code Here


                final String userAgentReceived = request.getHeaders(Http.UserAgent.LATEST.getHeaderName())[0].getValue();
                Assert.assertEquals(expectedUserAgent, userAgentSent);
                Assert.assertEquals(expectedUserAgent, userAgentReceived);
            }
        }));
        connection.execute(new AddonList(), apiKey);
        Mockit.tearDownMocks(AbstractHttpClient.class);
    }
View Full Code Here

            @Override
            public void responseHook(BasicHttpResponse response) {
                response.setHeader("Set-Cookie", "foo=bar; path=/;");
            }
        }));
        connection.execute(new AddonList(), apiKey);

        Mockit.setUpMock(AbstractHttpClient.class, new MockAbstractHttpClient(new MockHooks() {
            @Override
            public void beforeAssertions(HttpUriRequest request, HttpContext context) {
                Assert.assertEquals(request.getHeaders("Cookie").length, 0, "Cookies should be ignored, but there are cookies present.");
            }
        }));
        // run this twice to ensure the set-cookie was sent from the first request
        connection.execute(new AddonList(), apiKey);
        Mockit.tearDownMocks(AbstractHttpClient.class);
    }
View Full Code Here

        assertNotNull(response);
    }

    @Test(retryAnalyzer = GeneralRetryAnalyzer.class)
    public void testListAddons() {
        AddonList req = new AddonList();
        List<Addon> response = connection.execute(req, apiKey);
        assertNotNull(response, "Expected a response from listing addons, but the result is null.");
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.request.addon.AddonList

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.