You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by tobias rademacher <to...@innowake.de> on 2004/06/01 08:13:58 UTC

[Turbine 2.2] Initiating SecurityService in Unit TestCases

Hi Folks,

I want to init the SecurityService of Turbine in order to test isAuthorized(RunData data) method.

The sample I found in web using all Turbine 2.3 and using TurbineInit class. Is there a way to set up
Turbine 2.2 correctly for UnitTesting. 

This is what I do now:

     /**
	 * We need to set up <dfn>Torque</dfn> correctly.
	 * 
	 * @see TestCase#setUp()
	 */
	protected void setUp() throws Exception {		
		runDataCtl = MockControl.createControl(RunData.class);
		
		
		turbineMockData = aquireRunDataMockObject();				
		
		if (!Torque.isInit()) {
			Torque.init(TestResourceData.aquireTorqueResourcePath());										
			TurbineResourceService.setProperties(TestResourceData.aquireTurbineProperites());			
		}						
	}

Every help, advice, tip or thought is highly appriciated. :)

Thx

--
tobias rademacher
[sofwareentwickler]

innoWake gmbh
innovative.software.development();
graf-arco-strasse 18 | 89079 ulm-donautal
fon: +49 (0)7 31 - 5 50 27 - 0
fax: +49 (0)7 31 - 5 50 27 - 20
tobias.rademacher@innowake.de
www.innowake.de






---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org