use of org.asqatasun.entity.subject.Page 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.Page in project Asqatasun by Asqatasun.
the class AuditExportResultController method prepareSuccessfullAuditDataToExport.
/**
*
* @param page
* @param model
* @param locale
* @param exportFormat
* @param request
* @param response
* @return
* @throws IOException
*/
private void prepareSuccessfullAuditDataToExport(WebResource webResource, Model model, Locale locale, String exportFormat, HttpServletRequest request, HttpServletResponse response) throws NotSupportedExportFormatException {
model.addAttribute(TgolKeyStore.LOCALE_KEY, locale);
Scope scope = getSiteScope();
if (webResource instanceof Page) {
scope = getPageScope();
}
List<TestResult> testResultList = TestResultFactory.getInstance().getTestResultList(webResource, scope, getLocaleResolver().resolveLocale(request));
AuditStatistics auditStatistics = getAuditStatistics(webResource, model, TgolKeyStore.TEST_DISPLAY_SCOPE_VALUE, //TODO a revoir dans le cas manuel
false);
model.addAttribute(TgolKeyStore.STATISTICS_KEY, auditStatistics);
try {
exportService.export(response, webResource.getId(), auditStatistics, testResultList, locale, exportFormat);
} catch (ColumnBuilderException | ClassNotFoundException | JRException ex) {
LOGGER.error(ex);
}
}
Aggregations