Package saganx

Source Code of saganx.IntegrationTestsConfig

package saganx;

import sagan.SiteConfig;
import sagan.support.github.StubGithubRestClient;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.web.client.RestTemplate;

import static org.mockito.Mockito.mock;

@Configuration
@Import(SiteConfig.class)
class IntegrationTestsConfig {

    @Primary
    @Bean
    public RestTemplate mockRestTemplate() {
        return mock(RestTemplate.class);
    }

    @Primary
    @Bean
    public StubGithubRestClient stubGithubRestClient() {
        return new StubGithubRestClient();
    }
}
TOP

Related Classes of saganx.IntegrationTestsConfig

TOP
Copyright © 2018 www.massapi.com. 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.