alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (JUnitReport.scala)

This example Scala source code file (JUnitReport.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

junitreport, junitreport

The Scala JUnitReport.scala source code

/* NEST (New Scala Test)
 * Copyright 2007-2011 LAMP/EPFL
 */

package scala.tools
package partest
package io

/** This is disabled for the moment but I can fix it up if anyone
 *  is using it.
 */
class JUnitReport {
  // create JUnit Report xml files if directory was specified
  // def junitReport(dir: Directory) = {
  //   dir.mkdir()
  //   val report = testReport(set.kind, results, succs, fails)
  //   XML.save("%s/%s.xml".format(d.toAbsolute.path, set.kind), report)
  // }  

  // def oneResult(res: (TestEntity, Int)) =
  //   <testcase name={res._1.path}>{
  //    res._2 match {
  //      case 0 => scala.xml.NodeSeq.Empty
  //       case 1 => <failure message="Test failed"/>
  //       case 2 => <failure message="Test timed out"/>
  //    } 
  //  }</testcase>
  // 
  // def testReport(kind: String, results: Iterable[(TestEntity, Int)], succs: Int, fails: Int) = {
  //   <testsuite name={kind} tests={(succs + fails).toString} failures={fails.toString}>
  //    <properties/>
  //    {
  //      results.map(oneResult(_))
  //    }
  //   </testsuite>
  // }
  //
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala JUnitReport.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.