zoukankan      html  css  js  c++  java
  • @PropertySource

    @PropertySource("tempest-${spring.profiles.active}.properties")
    @PropertySource(factory = YamlPropertySourceFactory.class, value = "classpath:SlaTimeMap.yml")
    import com.citi.tm.api.report.portfolio.tradePortfolio.TradePortfolioReportServiceTest.TestContextConfiguration;
    import com.citi.tm.model.g10.trade.TradeSchema;
    import com.citi.tm.model.report.portfolio.PortfolioReport;
    import com.citi.tm.model.report.portfolio.TradePortfolioDto;
    import java.time.Instant;
    import java.util.List;
    import org.junit.Test;
    import org.junit.runner.RunWith;
    import org.mockito.stubbing.OngoingStubbing;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
    import org.springframework.boot.context.properties.EnableConfigurationProperties;
    import org.springframework.boot.test.context.SpringBootTest;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.context.annotation.Import;
    import org.springframework.data.mongodb.core.ReactiveMongoTemplate;
    import org.springframework.data.mongodb.core.aggregation.Aggregation;
    import org.springframework.test.context.ContextConfiguration;
    import org.springframework.test.context.TestPropertySource;
    import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
    import org.springframework.test.context.ActiveProfiles;
    import org.springframework.test.context.junit4.SpringRunner;
    import org.springframework.web.server.ResponseStatusException;
    import reactor.core.publisher.Flux;
    import reactor.core.publisher.Mono;
    import reactor.test.StepVerifier;
    
    /*@RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration(
        classes = {TestContextConfiguration.class, TradePortfolioReportService.class},
        initializers = {ConfigFileApplicationContextInitializer.class})
    @TestPropertySource(properties = {"spring.config.location=classpath:application-test.yml"})*/
    @RunWith(SpringRunner.class)
    @SpringBootTest(classes = TestContextConfiguration.class)
    @ActiveProfiles("test")
    public class TradePortfolioReportServiceTest {
    
      @Configuration
      @Import(TradePortfolioReportService.class)
      @EnableConfigurationProperties(TradePortfolioSlaTime.class)
      static class TestContextConfiguration {
        @Bean
        public List<ReactiveMongoTemplate> templates() {
          ReactiveMongoTemplate template = mock(ReactiveMongoTemplate.class);
          return asList(template);
        }
      }
  • 相关阅读:
    windows cmd中查看某个命令所在的路径
    linux vi编辑器中,如何通过快捷键上下翻页?
    linux系统中,查看当前系统中,都在监听哪些端口
    下载mysql server安装包的时候,不登录oracle账号,实现下载
    plsql developer中,清除登录历史
    linux环境下,清空history中记录的历史命令
    Linux下搭建hadoop开发环境-超详细
    HDFS架构详解-非官档
    SSH免密码登录配置方法详解
    bin/hdfs dfs命令存在WARN util.NativeCodeLoader问题消除方法
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/11971567.html
Copyright © 2011-2022 走看看