
org.specs2.reporter.HtmlReportOutput.scala Maven / Gradle / Ivy
The newest version!
package org.specs2
package reporter
import scala.xml.{Elem, NodeSeq}
import specification.{HtmlLink, Stats, SpecName}
import text.MarkupString
import execute.{Details, ResultStackTrace, Result}
import main.Diffs
import control.StackTraceFilter
/**
* This trait defines how the specification elements should be translated as xhtml
* An implementation of that trait must accumulate the results and return the created xhmtl
* with the xml method
*/
trait HtmlReportOutput {
/** @return the build html code */
def xml: NodeSeq
/** print a NodeSeq */
def print(xml: NodeSeq): HtmlReportOutput
/** print an Elem */
def print(xml: Elem): HtmlReportOutput
/** print a Text Node */
def print(text: String): HtmlReportOutput = print(scala.xml.Text(text))
/** print a Text Node with a new line */
def println(text: String = ""): HtmlReportOutput = print(text+"\n")
/** set the file path for the current output */
def filePathIs(path: String): HtmlReportOutput
/** enclose the nodes inside
tags */
def printHtml(n: =>NodeSeq): HtmlReportOutput
/** enclose the nodes inside
tags */
def printBody(n: =>NodeSeq): HtmlReportOutput
/** provide the