PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/ws-tester-engine/src/main/scala/com/googlecode/wstester/handlers/SimpleTestHandler.scala

http://ws-tester.googlecode.com/
Scala | 29 lines | 19 code | 4 blank | 6 comment | 0 complexity | 6dc830358480e2c7f07a8d160d2f76d0 MD5 | raw file
 1package com.googlecode.wstester.handlers
 2
 3import com.googlecode.wstester.config.RequestConfig
 4import com.googlecode.wstester.config.utils.{Velocity, PlainXML}
 5import utils.Send
 6import xml.XML
 7
 8/**
 9 * Created by IntelliJ IDEA.
10 * User: pablo
11 * Date: 2010-07-05
12 * Time: 12:24:02
13 */
14
15class SimpleTestHandler(var requestConfig : RequestConfig, var testDirName: String) {
16  def performRequest = {
17    requestConfig.requestType match {
18      case t: PlainXML => {
19        val request = XML.load(testDirName+"/"+requestConfig.requestFileName);
20        val requesthandler = new RequestHandler(request.toString);
21        requesthandler ! Send;
22      }
23      case t: Velocity => {
24
25      }
26      case _ => throw new IllegalArgumentException("Unknown request type");
27    }
28  }
29}