tracks/scala/testgen/src/main/scala/testgen/TestSuiteBuilder.scala in trackler-2.2.1.12 vs tracks/scala/testgen/src/main/scala/testgen/TestSuiteBuilder.scala in trackler-2.2.1.13
- old
+ new
@@ -13,21 +13,21 @@
type ToOptionTestCaseData = String => LabeledTestItem => Option[TestCaseData]
private val DefaultTemplate: TestSuiteTemplate =
txt.funSuiteTemplate.asInstanceOf[Template1[TestSuiteData, Txt]]
- def build(file: File, toTestCaseData: ToTestCaseData, imports: Seq[String] = Seq())(
+ def build(file: File, toTestCaseData: ToTestCaseData, imports: Seq[String] = Seq(), statements: Seq[String] = Seq())(
implicit template: TestSuiteTemplate = DefaultTemplate): String =
{
val exercise @ Exercise(name, version, cases, comments) =
CanonicalDataParser.parse(file)
val tsName = testSuiteName(name)
val testCasesAllPending = cases map toTestCaseData(sutName(name))
val testCases =
testCasesAllPending updated(0, testCasesAllPending.head.copy(pending = false))
val testSuiteData =
- TestSuiteData(tsName, version, imports, testCases)
+ TestSuiteData(tsName, version, imports, testCases, statements)
template.render(testSuiteData).toString
}
def buildFromOption(file: File, toTestCaseData: ToOptionTestCaseData, imports: Seq[String] = Seq())(
@@ -130,6 +130,6 @@
case class TestCaseData(description: String, sutCall: String, expected: String,
pending: Boolean = true)
case class TestSuiteData(name: String, version: String, imports: Seq[String],
- testCases: Seq[TestCaseData])
+ testCases: Seq[TestCaseData], statements: Seq[String] = Seq())