use of org.asqatasun.entity.subject.Site in project Asqatasun by Asqatasun.
the class SeoRule07061Test method setUpWebResourceMap.
@Override
protected void setUpWebResourceMap() {
Site site = getWebResourceFactory().createSite("file:Site-Passed1");
getWebResourceMap().put("Seo.Test.7.6.1-1Passed-01", site);
Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page01", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-1Passed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page02", page);
site = getWebResourceFactory().createSite("file:Site-Failed1");
getWebResourceMap().put("Seo.Test.7.6.1-2Failed-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page03", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page04", page);
site = getWebResourceFactory().createSite("file:Site-NA1");
getWebResourceMap().put("Seo.Test.7.6.1-4NA-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-4NA-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page05", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page06", page);
site = getWebResourceFactory().createSite("file:Site-Passed2");
getWebResourceMap().put("Seo.Test.7.6.1-1Passed-02", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page07", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page08", page);
site = getWebResourceFactory().createSite("file:Site-Failed2");
getWebResourceMap().put("Seo.Test.7.6.1-2Failed-02", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-03.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page09", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-04.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page10", page);
site = getWebResourceFactory().createSite("file:Site-Failed3");
getWebResourceMap().put("Seo.Test.7.6.1-2Failed-03", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-05.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page11", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-06.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page12", page);
site = getWebResourceFactory().createSite("file:Site-Failed4");
getWebResourceMap().put("Seo.Test.7.6.1-2Failed-04", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-07.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page13", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-08.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page14", page);
site = getWebResourceFactory().createSite("file:Site-Failed5");
getWebResourceMap().put("Seo.Test.7.6.1-2Failed-05", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-09.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page15", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule07061/Seo.Test.7.6.1-2Failed-10.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.7.6.1-page16", page);
}
use of org.asqatasun.entity.subject.Site in project Asqatasun by Asqatasun.
the class SeoRule01021Test method setUpWebResourceMap.
@Override
protected void setUpWebResourceMap() {
Site site = getWebResourceFactory().createSite("file:Site-Passed1");
getWebResourceMap().put("Seo.Test.1.2.1-1Passed-01", site);
Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page01", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-1Passed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page02", page);
site = getWebResourceFactory().createSite("file:Site-Failed1");
getWebResourceMap().put("Seo.Test.1.2.1-2Failed-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-2Failed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page03", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-2Failed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page04", page);
site = getWebResourceFactory().createSite("file:Site-NA1");
getWebResourceMap().put("Seo.Test.1.2.1-4NA-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-4NA-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page05", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page06", page);
site = getWebResourceFactory().createSite("file:Site-Passed2");
getWebResourceMap().put("Seo.Test.1.2.1-1Passed-02", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page07", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule01021/Seo.Test.1.2.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.1.2.1-page08", page);
}
use of org.asqatasun.entity.subject.Site in project Asqatasun by Asqatasun.
the class SeoRule01061Test method setUpWebResourceMap.
@Override
protected void setUpWebResourceMap() {
Site site = getWebResourceFactory().createSite("http://site-robot.asqatasun.ovh");
getWebResourceMap().put("Seo.Test.1.6.1-2Failed-01", site);
Page page = getWebResourceFactory().createPage("http://site-robot.asqatasun.ovh");
site.addChild(page);
site = getWebResourceFactory().createSite("http://site.asqatasun.ovh");
getWebResourceMap().put("Seo.Test.1.6.1-2Failed-02", site);
page = getWebResourceFactory().createPage("http://site.asqatasun.ovh");
site.addChild(page);
site = getWebResourceFactory().createSite("http://site-sitemap.asqatasun.ovh");
getWebResourceMap().put("Seo.Test.1.6.1-1Passed-01", site);
page = getWebResourceFactory().createPage("http://site-sitemap.asqatasun.ovh");
site.addChild(page);
}
use of org.asqatasun.entity.subject.Site in project Asqatasun by Asqatasun.
the class SeoRule06041Test method setUpWebResourceMap.
@Override
protected void setUpWebResourceMap() {
// file:Site-Passed1
Site site = getWebResourceFactory().createSite("file:Site-Passed1");
getWebResourceMap().put("Seo.Test.6.4.1-1Passed-01", site);
Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page01", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page02", page);
// file:Site-Failed1
site = getWebResourceFactory().createSite("file:Site-Failed1");
getWebResourceMap().put("Seo.Test.6.4.1-2Failed-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page03", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page04", page);
// file:Site-NA1
site = getWebResourceFactory().createSite("file:Site-NA1");
getWebResourceMap().put("Seo.Test.6.4.1-4NA-01", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page05", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page06", page);
// file:Site-Passed2
site = getWebResourceFactory().createSite("file:Site-Passed2");
getWebResourceMap().put("Seo.Test.6.4.1-1Passed-02", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-02.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page07", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-01.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page08", page);
// file:Site-Passed3
site = getWebResourceFactory().createSite("file:Site-Passed3");
getWebResourceMap().put("Seo.Test.6.4.1-1Passed-03", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-03.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page09", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-04.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page10", page);
// file:Site-Failed2
site = getWebResourceFactory().createSite("file:Site-Failed2");
getWebResourceMap().put("Seo.Test.6.4.1-2Failed-02", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-03.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page11", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-04.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page12", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-05.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page13", page);
// file:Site-Failed3
site = getWebResourceFactory().createSite("file:Site-Failed3");
getWebResourceMap().put("Seo.Test.6.4.1-2Failed-03", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-06.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page14", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-07.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page15", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-08.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page16", page);
// file:Site-Failed4
site = getWebResourceFactory().createSite("file:Site-Failed4");
getWebResourceMap().put("Seo.Test.6.4.1-2Failed-04", site);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-09.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page17", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-10.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page18", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-11.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page19", page);
page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-12.html");
site.addChild(page);
getWebResourceMap().put("Seo.Test.6.4.1-page20", page);
}
use of org.asqatasun.entity.subject.Site in project Asqatasun by Asqatasun.
the class ManualAuditController method dispatchSubmitManualAuditValues.
/**
* TO DO : replace this method with an call to the orchestrator
* to delegate the writes to the engine.
*
* @param webresourceId
* @param manualAuditCommand
* @param result
* @param model
* @param request
* @param isValidating
* @return
*/
private String dispatchSubmitManualAuditValues(String webresourceId, ManualAuditCommand manualAuditCommand, BindingResult result, Model model, HttpServletRequest request, boolean isValidating) {
WebResource webResource;
try {
webResource = getWebResourceDataService().ligthRead(Long.valueOf(webresourceId));
} catch (NumberFormatException nfe) {
throw new ForbiddenPageException();
}
if (webResource instanceof Site) {
throw new ForbiddenPageException();
}
Audit audit = getAuditFromWebResource(webResource);
if (isUserAllowedToDisplayResult(audit)) {
model.addAttribute(TgolKeyStore.IS_MANUAL_AUDIT_KEY, true);
List<ProcessResult> processResultList = TestResultFactory.getInstance().getProcessResultListFromTestsResult(manualAuditCommand.getModifiedManualResultMap(), webResource);
processResultDataService.saveOrUpdate(processResultList);
/**
* if save the manual audit for the first time save we set the
* manual audit start time and status to MANUAL_INITIALIZING
*/
if (audit.getManualAuditDateOfCreation() == null) {
audit.setManualAuditDateOfCreation(Calendar.getInstance().getTime());
audit.setStatus(AuditStatus.MANUAL_INITIALIZING);
getAuditDataService().update(audit);
}
List<ProcessResult> allProcessResultList = TestResultFactory.getInstance().getAllProcessResultListFromTestsResult(manualAuditCommand.getModifiedManualResultMap(), webResource);
manualAuditCommand.setProcessResultList(allProcessResultList);
if (isValidating) {
manualAuditValidator.validate(manualAuditCommand, result);
if (result.hasErrors()) {
// ajout message d'erreur.
model.addAttribute(TgolKeyStore.MANUAL_AUDIT_COMMAND_KEY, manualAuditCommand);
return dispatchDisplayResultRequest(webResource.getId(), null, model, request, true, manualAuditCommand);
} else {
// mettre à jour le statut
audit.setStatus(AuditStatus.MANUAL_COMPLETED);
getAuditDataService().update(audit);
webResourceStatisticsDataService.createWebResourceStatisticsForManualAudit(audit, webResource, allProcessResultList);
Contract contract = retrieveContractFromAudit(audit);
model.addAttribute(TgolKeyStore.CONTRACT_ID_KEY, contract.getId());
return TgolKeyStore.CONTRACT_VIEW_NAME_REDIRECT;
}
}
webResourceStatisticsDataService.createWebResourceStatisticsForManualAudit(audit, webResource, allProcessResultList);
return dispatchDisplayResultRequest(webResource.getId(), null, model, request, true, manualAuditCommand);
} else {
throw new ForbiddenPageException();
}
}
Aggregations