Package org.sonar.core.i18n

Examples of org.sonar.core.i18n.DefaultI18n.message()


  @Test
  public void shouldSaveLinks() {
    Settings settings = new Settings();
    settings.setProperty(CoreProperties.LINKS_HOME_PAGE, "http://home");
    DefaultI18n defaultI18n = mock(DefaultI18n.class);
    when(defaultI18n.message(Locale.getDefault(), "project_links.homepage", CoreProperties.LINKS_HOME_PAGE)).thenReturn("HOME");
    Project project = mock(Project.class);
    SensorContext context = mock(SensorContext.class);

    new ProjectLinksSensor(settings, defaultI18n).analyse(project, context);
View Full Code Here


  @Test
  public void shouldDeleteLink() {
    Settings settings = new Settings();
    settings.setProperty(CoreProperties.LINKS_HOME_PAGE, "");
    DefaultI18n defaultI18n = mock(DefaultI18n.class);
    when(defaultI18n.message(Locale.getDefault(), "project_links.homepage", CoreProperties.LINKS_HOME_PAGE)).thenReturn("HOME");
    Project project = mock(Project.class);
    SensorContext context = mock(SensorContext.class);

    new ProjectLinksSensor(settings, defaultI18n).analyse(project, context);
View Full Code Here

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.