use of org.sonar.api.i18n.I18n in project sonarqube by SonarSource.
the class PersistProjectLinksStepTest method setup.
@Before
public void setup() {
I18n i18n = mock(I18n.class);
when(i18n.message(Locale.ENGLISH, "project_links.homepage", null)).thenReturn("Home");
when(i18n.message(Locale.ENGLISH, "project_links.scm", null)).thenReturn("Sources");
when(i18n.message(Locale.ENGLISH, "project_links.scm_dev", null)).thenReturn("Developer connection");
when(i18n.message(Locale.ENGLISH, "project_links.ci", null)).thenReturn("Continuous integration");
when(i18n.message(Locale.ENGLISH, "project_links.issue", null)).thenReturn("Issues");
step = new PersistProjectLinksStep(dbTester.getDbClient(), i18n, treeRootHolder, reportReader);
}
use of org.sonar.api.i18n.I18n in project sonarqube by SonarSource.
the class QProfilesWsTest method setUp.
@Before
public void setUp() {
QProfileService profileService = mock(QProfileService.class);
I18n i18n = mock(I18n.class);
DbClient dbClient = mock(DbClient.class);
Languages languages = LanguageTesting.newLanguages(xoo1Key, xoo2Key);
ProjectAssociationParameters projectAssociationParameters = new ProjectAssociationParameters(languages);
ProfileImporter[] importers = createImporters(languages);
controller = new WsTester(new QProfilesWs(new RuleActivationActions(profileService), new BulkRuleActivationActions(profileService, null), new AddProjectAction(projectAssociationParameters, null, null, dbClient), new RemoveProjectAction(projectAssociationParameters, null, null, dbClient), new CreateAction(null, null, null, languages, wsSupport, null, importers), new ImportersAction(importers), new RestoreBuiltInAction(null, languages, wsSupport), new SearchAction(null, languages), new SetDefaultAction(languages, null, null, wsSupport), new ProjectsAction(null, userSessionRule), new BackupAction(dbClient, null, null, languages), new RestoreAction(null, languages, wsSupport), new ChangelogAction(null, mock(QProfileFactory.class), languages, dbClient), new ChangeParentAction(dbClient, null, null, languages, wsSupport), new CompareAction(null, null, languages), new CopyAction(null, languages, wsSupport), new DeleteAction(languages, null, null, wsSupport), new ExportAction(null, null, mock(QProfileExporters.class), languages), new ExportersAction(), new InheritanceAction(null, null, null, null, languages), new RenameAction(null, wsSupport))).controller(QProfilesWs.API_ENDPOINT);
}
Aggregations