Search in sources :

Example 1 with SSPHandler

use of org.asqatasun.processor.SSPHandler in project Asqatasun by Asqatasun.

the class DoctypeHtml5CheckerTest method testChecker.

/**
 * @param doctype
 * @param result
 * @param remark
 */
private void testChecker(String doctype, TestSolution result, String remark) {
    ProcessRemarkService processRemarkService = createMock(ProcessRemarkService.class);
    SSP ssp = createMock(SSP.class);
    SSPHandler sspHandler = createMock(SSPHandler.class);
    expect(sspHandler.getSSP()).andReturn(ssp);
    expect(ssp.getDoctype()).andReturn(doctype);
    if (StringUtils.isNotBlank(remark)) {
        processRemarkService.addProcessRemark(result, remark);
        expectLastCall();
    }
    // Elements not used in this implementation
    Elements elements = null;
    TestSolutionHandler testSolutionHandler = createMock(TestSolutionHandler.class);
    testSolutionHandler.addTestSolution(result);
    expectLastCall();
    replay(ssp, sspHandler, processRemarkService, testSolutionHandler);
    DoctypeHtml5Checker instance = new DoctypeHtml5Checker();
    instance.setProcessRemarkService(processRemarkService);
    instance.doCheck(sspHandler, elements, testSolutionHandler);
    verify(ssp, sspHandler, processRemarkService, testSolutionHandler);
}
Also used : SSP(org.asqatasun.entity.audit.SSP) SSPHandler(org.asqatasun.processor.SSPHandler) TestSolutionHandler(org.asqatasun.ruleimplementation.TestSolutionHandler) Elements(org.jsoup.select.Elements) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Aggregations

SSP (org.asqatasun.entity.audit.SSP)1 SSPHandler (org.asqatasun.processor.SSPHandler)1 TestSolutionHandler (org.asqatasun.ruleimplementation.TestSolutionHandler)1 ProcessRemarkService (org.asqatasun.service.ProcessRemarkService)1 Elements (org.jsoup.select.Elements)1