当前位置: 首页>>代码示例>>Java>>正文


Java JHipsterProperties.Ribbon方法代码示例

本文整理汇总了Java中io.github.jhipster.config.JHipsterProperties.Ribbon方法的典型用法代码示例。如果您正苦于以下问题:Java JHipsterProperties.Ribbon方法的具体用法?Java JHipsterProperties.Ribbon怎么用?Java JHipsterProperties.Ribbon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.github.jhipster.config.JHipsterProperties的用法示例。


在下文中一共展示了JHipsterProperties.Ribbon方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import io.github.jhipster.config.JHipsterProperties; //导入方法依赖的package包/类
@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    String mockProfile[] = {"test"};
    JHipsterProperties.Ribbon ribbon = new JHipsterProperties.Ribbon();
    ribbon.setDisplayOnActiveProfiles(mockProfile);
    when(jHipsterProperties.getRibbon()).thenReturn(ribbon);

    String activeProfiles[] = {"test"};
    when(environment.getDefaultProfiles()).thenReturn(activeProfiles);
    when(environment.getActiveProfiles()).thenReturn(activeProfiles);

    ProfileInfoResource profileInfoResource = new ProfileInfoResource(environment, jHipsterProperties);
    this.restProfileMockMvc = MockMvcBuilders
        .standaloneSetup(profileInfoResource)
        .build();
}
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:18,代码来源:ProfileInfoResourceIntTest.java

示例2: setup

import io.github.jhipster.config.JHipsterProperties; //导入方法依赖的package包/类
@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    String mockProfile[] = { "test" };
    JHipsterProperties.Ribbon ribbon = new JHipsterProperties.Ribbon();
    ribbon.setDisplayOnActiveProfiles(mockProfile);
    when(jHipsterProperties.getRibbon()).thenReturn(ribbon);

    String activeProfiles[] = {"test"};
    when(environment.getDefaultProfiles()).thenReturn(activeProfiles);
    when(environment.getActiveProfiles()).thenReturn(activeProfiles);

    ProfileInfoResource profileInfoResource = new ProfileInfoResource(environment, jHipsterProperties);
    this.restProfileMockMvc = MockMvcBuilders
        .standaloneSetup(profileInfoResource)
        .build();
}
 
开发者ID:pascalgrimaud,项目名称:qualitoast,代码行数:18,代码来源:ProfileInfoResourceIntTest.java

示例3: getProfileInfoWithoutRibbon

import io.github.jhipster.config.JHipsterProperties; //导入方法依赖的package包/类
@Test
public void getProfileInfoWithoutRibbon() throws Exception {
    JHipsterProperties.Ribbon ribbon = new JHipsterProperties.Ribbon();
    ribbon.setDisplayOnActiveProfiles(null);
    when(jHipsterProperties.getRibbon()).thenReturn(ribbon);

    restProfileMockMvc.perform(get("/api/profile-info"))
        .andExpect(status().isOk())
        .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE));
}
 
开发者ID:asanzdiego,项目名称:codemotion-2017-taller-de-jhipster,代码行数:11,代码来源:ProfileInfoResourceIntTest.java

示例4: setup

import io.github.jhipster.config.JHipsterProperties; //导入方法依赖的package包/类
@Before
public void setup() {
    Environment env = Mockito.mock(Environment.class);
    JHipsterProperties prop = Mockito.mock(JHipsterProperties.class);
    JHipsterProperties.Ribbon ribbon = Mockito.mock(JHipsterProperties.Ribbon.class);

    ProfileInfoResource profileInfoResource = new ProfileInfoResource(env, prop);
    this.mock = MockMvcBuilders.standaloneSetup(profileInfoResource).build();

    Mockito.when(env.getActiveProfiles()).thenReturn(profiles);
    Mockito.when(prop.getRibbon()).thenReturn(ribbon);
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:13,代码来源:ProfileInfoResourceTest.java

示例5: getProfileInfoWithoutRibbon

import io.github.jhipster.config.JHipsterProperties; //导入方法依赖的package包/类
@Test
public void getProfileInfoWithoutRibbon() throws Exception {
    JHipsterProperties.Ribbon ribbon = new JHipsterProperties.Ribbon();
    ribbon.setDisplayOnActiveProfiles(null);
    when(jHipsterProperties.getRibbon()).thenReturn(ribbon);

    ProfileInfo profileInfo = stub.getActiveProfiles(Empty.newBuilder().build());
    assertThat(profileInfo.getActiveProfilesList()).containsExactly("test");
    assertThat(profileInfo.getRibbonEnv()).isEmpty();
}
 
开发者ID:cbornet,项目名称:generator-jhipster-grpc,代码行数:11,代码来源:_ProfileInfoServiceIntTest.java


注:本文中的io.github.jhipster.config.JHipsterProperties.Ribbon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。