View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.loadtest;
14  
15  import com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext;
16  import com.eviware.soapui.model.testsuite.LoadTestRunContext;
17  import com.eviware.soapui.model.testsuite.LoadTestRunner;
18  import com.eviware.soapui.model.testsuite.TestCaseRunner;
19  
20  /***
21   * LoadTestRunContext implementation for WsdlLoadTests
22   * 
23   * @author Ole.Matzura
24   */
25  
26  public class WsdlLoadTestContext extends DefaultPropertyExpansionContext implements LoadTestRunContext
27  {
28  	private final WsdlLoadTestRunner runner;
29  
30  	public WsdlLoadTestContext( WsdlLoadTestRunner runner )
31  	{
32  		super( runner.getLoadTest().getTestCase() );
33  		this.runner = runner;
34  	}
35  
36  	public LoadTestRunner getLoadTestRunner()
37  	{
38  		return runner;
39  	}
40  
41  	@Override
42  	public Object get( Object key )
43  	{
44  		if( "loadTestRunner".equals( key ) )
45  			return runner;
46  
47  		return super.get( key );
48  	}
49  
50  	public Object getProperty( String testStep, String propertyName )
51  	{
52  		// TODO Auto-generated method stub
53  		return null;
54  	}
55  
56  	public TestCaseRunner getTestRunner()
57  	{
58  		// TODO Auto-generated method stub
59  		return null;
60  	}
61  }