01: /*
02: * $Id: TestServiceImpl.java 8077 2007-08-27 20:15:25Z aperepel $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.tck.external.applications;
12:
13: public class TestServiceImpl implements TestService {
14: private Test[] tests = new Test[] {};
15:
16: public TestServiceImpl() {
17: tests = new Test[] { new Test("test1"), new Test("test2") };
18: }
19:
20: public Test[] getTests() {
21: return tests;
22: }
23:
24: public Test getTest(String key) throws Exception {
25: for (int i = 0; i < tests.length; i++) {
26: if (tests[i].getKey().equals(key))
27: return tests[i];
28: }
29:
30: throw new Exception("No test found with key " + key);
31: }
32:
33: }
|