use of org.sonar.server.source.HtmlSourceDecorator in project sonarqube by SonarSource.
the class LinesActionTest method setUp.
@Before
public void setUp() {
htmlSourceDecorator = mock(HtmlSourceDecorator.class);
when(htmlSourceDecorator.getDecoratedSourceAsHtml(anyString(), anyString(), anyString())).then(new Answer<String>() {
@Override
public String answer(InvocationOnMock invocationOnMock) throws Throwable {
return "<p>" + invocationOnMock.getArguments()[0] + "</p>";
}
});
sourceService = new SourceService(dbTester.getDbClient(), htmlSourceDecorator);
componentDao = new ComponentDao();
wsTester = new WsTester(new SourcesWs(new LinesAction(new ComponentFinder(dbTester.getDbClient()), dbTester.getDbClient(), sourceService, htmlSourceDecorator, userSessionRule)));
}
Aggregations