SHARE
TWEET

Untitled

a guest Jun 19th, 2017 43 in 3 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   def testNode(testName: String, testExecutionTimes: Seq[Int]): Node =
  2.     <test>
  3.       <name>{testName}</name>
  4.       {testExecutionTimes.foreach(createTimeNode)}
  5.     </test>
  6.  
  7.   def createTimeNode(testExecutionTime: Int): Node =
  8.     <time>{testExecutionTime}</time>
  9.  
  10.   def finalXML(parsedResults: Map[String, Seq[Int]]): Node =
  11.     <testResults>
  12.       {for ((k, v) <- parsedResults)
  13.       yield testNode(k, v)
  14.       }
  15.     </testResults>
  16.  
  17.   def saveXml(parsedResults: Map[String, Seq[Int]]): Unit =
  18.     XML.save(filename = "XXXXXX.xml", node = finalXML(parsedResults))
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top