PageRenderTime 19ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://ws-tester.googlecode.com/
Scala | 32 lines | 22 code | 4 blank | 6 comment | 0 complexity | 50bbe04eb1a44561b73f168b94a91a4f MD5 | raw file
 1package com.googlecode.wstester.handlers
 2
 3import com.googlecode.wstester.config.TestConfig
 4import com.googlecode.wstester.config.utils.{OneShot, Conversation, Simple}
 5
 6/**
 7 * Created by IntelliJ IDEA.
 8 * User: pablo
 9 * Date: 2010-07-05
10 * Time: 12:20:36
11 */
12
13class TestHandler(var testConfig: TestConfig, var testDirname: String) {
14  def runTest = {
15    testConfig testType match {
16      case t: Simple => {
17        val testHandler = new SimpleTestHandler(testConfig.requests.first, testDirname);
18        testHandler.performRequest;
19      }
20      case t: Conversation => {
21
22      }
23      case t: OneShot => {
24        val testHandler = new OneShotTestHandler(testConfig.requests.first, testDirname);
25        testHandler.performRequest;
26      }              
27      case _ => {
28        throw new IllegalArgumentException("Unknown test type");
29      }
30    }
31  }
32}