All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.form.InlinedForm.scala Maven / Gradle / Ivy

There is a newer version: 3.7
Show newest version
package org.specs2
package form

import main.Arguments
import execute.Result
import text.Trim._

/**
 * This Form overrides the toXml and text methods so that it appears seamlessly included in another Form.
 */
class InlinedForm(title: Option[String] = None, rows: Seq[Row] = Vector(), result: Option[Result] = None) extends Form(title, rows, result) {
  /** @return an xml description of this form */
  override def toXml(implicit args: Arguments = Arguments()) = 
{Form.titleAndRows(this)(args) ++ Form.formStacktraces(this)(args) }
/** @return an xml description of this form, to be embedded in a Cell */ override def toCellXml(implicit args: Arguments = Arguments()) = toXml(args) override protected def newForm(title: Option[String] = None, rows: Seq[Row] = Vector(), result: Option[Result] = None) = new InlinedForm(title, rows, result) override def text: String = super.text.removeStart("| ").removeEnd(" |") }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy