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);
}
Aggregations