01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.test;
17:
18: import java.lang.annotation.ElementType;
19: import java.lang.annotation.Retention;
20: import java.lang.annotation.RetentionPolicy;
21: import java.lang.annotation.Target;
22:
23: import org.kuali.test.fixtures.UserNameFixture;
24:
25: /**
26: * Use this annotation to configure the appropriate context for the methods in a test that extends KualiTestBase.
27: *
28: * @see ShouldCommitTransactions
29: */
30: @Retention(RetentionPolicy.RUNTIME)
31: @Target({ElementType.METHOD,ElementType.TYPE})
32: public @interface ConfigureContext {
33: /**
34: * This method returns the UserNameFixture that should be used to create the appropriate UserSession.
35: *
36: * @return sessionUserNameFixture
37: */
38: UserNameFixture session() default UserNameFixture.NO_SESSION;
39:
40: /**
41: * This method indicates whether the test needs the batch schedule initialize. The scheduler will always be started. And, if
42: * your test is simply grabbing Steps from Spring and executing manually, you do not need the quartz schedule loaded.
43: *
44: * @return initializeBatchSchedule
45: */
46: boolean initializeBatchSchedule() default false;
47:
48: /**
49: * This method indicates whether the database changes that occur during test code execution should be committed or rolled back.
50: *
51: * @return shouldCommitTransactions
52: */
53: boolean shouldCommitTransactions() default false;
54: }
|