View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 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.panels.support;
14  
15  import com.eviware.soapui.model.support.AbstractSubmitContext;
16  import com.eviware.soapui.model.testsuite.LoadTestRunContext;
17  import com.eviware.soapui.model.testsuite.LoadTestRunner;
18  
19  public class MockLoadTestRunContext extends AbstractSubmitContext implements LoadTestRunContext
20  {
21  	private final MockLoadTestRunner mockTestRunner;
22  
23  	public MockLoadTestRunContext(MockLoadTestRunner mockTestRunner)
24  	{
25  		super( mockTestRunner.getLoadTest() );
26  		this.mockTestRunner = mockTestRunner;
27  	}
28  
29  	public LoadTestRunner getLoadTestRunner()
30  	{
31  		return mockTestRunner;
32  	}
33  
34  	public Object getProperty(String name)
35  	{
36  		if( "loadTestRunner".equals(name))
37  			return getLoadTestRunner();
38  		
39  		return get( name );
40  	}
41  }