Java Code Examples for io.github.jhipster.config.JHipsterProperties#Ribbon

The following examples show how to use io.github.jhipster.config.JHipsterProperties#Ribbon . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 2
Source File: ProfileInfoResourceIntTest.java    From jhipster-microservices-example with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 3
Source File: ProfileInfoResourceIntegrationTest.java    From tutorials with MIT License 6 votes vote down vote up
@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();
}
 
Example 4
Source File: ProfileInfoResourceIntTest.java    From jhipster-microservices-example with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 5
Source File: ProfileInfoResourceIntTest.java    From Full-Stack-Development-with-JHipster with MIT License 6 votes vote down vote up
@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();
}
 
Example 6
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 7
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 8
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 9
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 10
Source File: ProfileInfoResourceIntegrationTest.java    From tutorials with MIT License 6 votes vote down vote up
@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();
}
 
Example 11
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 12
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 13
Source File: ProfileInfoResourceIntegrationTest.java    From tutorials with MIT License 5 votes vote down vote up
@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));
}
 
Example 14
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 15
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 16
Source File: ProfileInfoResourceIntTest.java    From jhipster-microservices-example with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 17
Source File: ProfileInfoResourceIntTest.java    From Full-Stack-Development-with-JHipster with MIT License 5 votes vote down vote up
@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));
}
 
Example 18
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 19
Source File: ProfileInfoResourceIntTest.java    From jhipster-microservices-example with Apache License 2.0 5 votes vote down vote up
@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));
}
 
Example 20
Source File: ProfileInfoResourceIntTest.java    From cubeai with Apache License 2.0 5 votes vote down vote up
@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));
}