2016-01-19 06:12:11 -06:00
|
|
|
package com.baeldung;
|
2016-01-10 17:07:41 +02:00
|
|
|
|
|
|
|
import org.mockito.Mockito;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.annotation.Primary;
|
|
|
|
import org.springframework.context.annotation.Profile;
|
|
|
|
|
|
|
|
@Profile("test")
|
|
|
|
@Configuration
|
|
|
|
public class NameServiceTestConfiguration {
|
|
|
|
@Bean
|
|
|
|
@Primary
|
|
|
|
public NameService nameService() {
|
|
|
|
return Mockito.mock(NameService.class);
|
|
|
|
}
|
|
|
|
}
|