@Test
public void testWriting() throws Exception{
String ROOT = "root";
MemoryResourceSystem resources = new MemoryResourceSystem();
DocumentationContext documentationContext = new DocumentationContext();
documentationContext.setLocale(Locale.GERMAN);
documentationContext.setAttribute(ResourceSystem.class, resources);
documentationContext.setAttribute(DocumentationContext.DOCUMENTATION_TARGET_PARAMETER, ROOT);
SoftwareDocumentationBoostUtils.createSoftwareDocumentation(this,
documentationContext, true, true);
//check whether a h2 is present (the chapter hierarchy is ok)
boolean h2Present = false;
//checks
for (Entry<String, ByteArrayOutputStream > entry: resources.getStorage().entrySet()){
if (entry.getKey().endsWith("index.html")){
String text = entry.getValue().toString();
h2Present |= text.contains("<h2>");