Package com.rallydev.rest.matchers

Examples of com.rallydev.rest.matchers.HttpRequestHeaderMatcher


    @Test
    public void shouldIncludeApiKeyOnRequest() throws Exception {
        doReturn("").when(client).executeRequest(any(HttpRequestBase.class));
        client.doRequest(new HttpGet());
        verify(client).doRequest(argThat(new HttpRequestHeaderMatcher("zsessionid", apiKey)));
    }
View Full Code Here


    public void shouldRequestCSRFToken() throws Exception {
        doReturn("").when(client).executeRequest(any(HttpPost.class));
        doReturn(SECURITY_TOKEN_RESPONSE).when(client).executeRequest(any(HttpGet.class));
        client.doRequest(new HttpPost(server));
        Header authHeader = BasicScheme.authenticate(client.credentials, "utf-8", false);
        verify(client).executeRequest(argThat(new HttpRequestHeaderMatcher(authHeader.getName(), authHeader.getValue())));
    }
View Full Code Here

    @Test
    public void shouldSetApplicationVendor() throws Exception {
        doReturn("").when(client).executeRequest(any(HttpRequestBase.class));
        client.setApplicationVendor("FooVendor");
        client.doRequest(new HttpGet());
        verify(client).doRequest(argThat(new HttpRequestHeaderMatcher("X-RallyIntegrationVendor", "FooVendor")));
    }
View Full Code Here

    @Test
    public void shouldSetApplicationName() throws Exception {
        doReturn("").when(client).executeRequest(any(HttpRequestBase.class));
        client.setApplicationName("FooName");
        client.doRequest(new HttpGet());
        verify(client).doRequest(argThat(new HttpRequestHeaderMatcher("X-RallyIntegrationName", "FooName")));
    }
View Full Code Here

    @Test
    public void shouldSetApplicationVersion() throws Exception {
        doReturn("").when(client).executeRequest(any(HttpRequestBase.class));
        client.setApplicationVersion("FooVersion");
        client.doRequest(new HttpGet());
        verify(client).doRequest(argThat(new HttpRequestHeaderMatcher("X-RallyIntegrationVersion", "FooVersion")));
    }
View Full Code Here

TOP

Related Classes of com.rallydev.rest.matchers.HttpRequestHeaderMatcher

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.