Search in sources :

Example 1 with MockServerRestTemplateCustomizer

use of org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer in project spring-boot by spring-projects.

the class CloudFoundrySecurityServiceTests method setup.

@Before
public void setup() throws Exception {
    MockServerRestTemplateCustomizer mockServerCustomizer = new MockServerRestTemplateCustomizer();
    RestTemplateBuilder builder = new RestTemplateBuilder(mockServerCustomizer);
    this.securityService = new CloudFoundrySecurityService(builder, CLOUD_CONTROLLER, false);
    this.server = mockServerCustomizer.getServer();
}
Also used : RestTemplateBuilder(org.springframework.boot.web.client.RestTemplateBuilder) MockServerRestTemplateCustomizer(org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 MockServerRestTemplateCustomizer (org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer)1 RestTemplateBuilder (org.springframework.boot.web.client.RestTemplateBuilder)1