001: /*
002: * Copyright 2005-2006 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005: * in compliance with the License. You may obtain a copy of the License at
006: *
007: * http://www.apache.org/licenses/LICENSE-2.0
008: *
009: * Unless required by applicable law or agreed to in writing, software distributed under the License
010: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011: * or implied. See the License for the specific language governing permissions and limitations under
012: * the License.
013: */
014:
015: package org.strecks.testng;
016:
017: import java.util.ArrayList;
018: import java.util.List;
019:
020: import org.strecks.action.basic.TestBaseBasicController;
021: import org.strecks.action.basic.TestBasicController;
022: import org.strecks.action.basic.TestBasicDispatchController;
023: import org.strecks.action.basic.TestBasicFormController;
024: import org.strecks.action.basic.TestBasicLookupDispatchController;
025: import org.strecks.action.basic.TestBasicMappingDispatchController;
026: import org.strecks.action.basic.TestBasicSubmitController;
027: import org.strecks.action.navigable.TestNavigableDispatchController;
028: import org.strecks.action.navigable.TestNavigableFormController;
029: import org.strecks.action.navigable.TestNavigableLookupDispatchController;
030: import org.strecks.action.navigable.TestNavigableMappingDispatchController;
031: import org.strecks.action.navigable.TestNavigableReadOnlyController;
032: import org.strecks.action.navigable.TestNavigableSubmitController;
033: import org.strecks.bind.handler.TestAbstractBindHandler;
034: import org.strecks.bind.handler.TestBindSelectHandler;
035: import org.strecks.bind.handler.TestBindSelectHandlerMethods;
036: import org.strecks.bind.handler.TestBindSimpleHandler;
037: import org.strecks.bind.handler.TestBindSimpleHandlerMethods;
038: import org.strecks.bind.handler.TestBindablesReader;
039: import org.strecks.bind.internal.TestBindableReaderImpl;
040: import org.strecks.bind.internal.TestReadBindablesWithConverter;
041: import org.strecks.builder.TestBootStrapper;
042: import org.strecks.builder.TestConfigUtils;
043: import org.strecks.builder.TestInterceptorBuilderImpl;
044: import org.strecks.builder.TestPropertiesBuilder;
045: import org.strecks.context.TestActionContextImpl;
046: import org.strecks.controller.TestActionCreator;
047: import org.strecks.controller.TestBaseControllerAction;
048: import org.strecks.controller.TestControllerProcessorDelegateImpl;
049: import org.strecks.controller.TestControllerRequestProcessor;
050: import org.strecks.controller.TestImplicitActionCreation;
051: import org.strecks.controller.TestNavigableControllerAction;
052: import org.strecks.controller.chain.command.TestCreateAction;
053: import org.strecks.controller.chain.command.TestDelegatingProcessActionForm;
054: import org.strecks.controller.chain.command.TestExecuteAction;
055: import org.strecks.controller.chain.command.TestPopulateActionForm;
056: import org.strecks.controller.chain.command.TestPreprocess;
057: import org.strecks.controller.chain.command.TestRegularProcessActionForm;
058: import org.strecks.controller.chain.command.TestValidateActionForm;
059: import org.strecks.converter.TestBeanUtilsConverter;
060: import org.strecks.converter.TestBind;
061: import org.strecks.converter.TestBlankToNullStringConverter;
062: import org.strecks.converter.TestDateFormatConverter;
063: import org.strecks.converter.TestDatePatternConverter;
064: import org.strecks.converter.TestSafeBeanUtilsConverter;
065: import org.strecks.converter.TestStringConverter;
066: import org.strecks.converter.handler.TestDefaultConversionHandler;
067: import org.strecks.converter.internal.TestConverterReader;
068: import org.strecks.dispatch.internal.TestDispatchControllerHelper;
069: import org.strecks.dispatch.internal.TestDispatchMethodLookupReader;
070: import org.strecks.form.controller.TestDelegatingForm;
071: import org.strecks.form.controller.TestDelegatingFormBinding;
072: import org.strecks.form.controller.TestDelegatingFormValidation;
073: import org.strecks.form.controller.TestFormBinding;
074: import org.strecks.form.controller.TestObjectFormBinding;
075: import org.strecks.form.controller.TestObjectValidator;
076: import org.strecks.form.controller.TestSelectFormBinding;
077: import org.strecks.form.controller.TestValidatorWrapper;
078: import org.strecks.form.handler.TestFormPopulateSourceImpl;
079: import org.strecks.form.handler.TestFormValidationHandlerImpl;
080: import org.strecks.form.handler.TestValidBindFormHandler;
081: import org.strecks.form.impl.SelectForm;
082: import org.strecks.form.impl.TestForm;
083: import org.strecks.injection.annotation.TestAnnotationChecker;
084: import org.strecks.injection.annotation.TestInjectionSetter;
085: import org.strecks.injection.factory.TestInvalidRequestConverter;
086: import org.strecks.injection.handler.TestActionFormInjectionHandler;
087: import org.strecks.injection.handler.TestActionMappingInjectionHandler;
088: import org.strecks.injection.handler.TestAutoCreateAction;
089: import org.strecks.injection.handler.TestContextInjectionHandler;
090: import org.strecks.injection.handler.TestInvalidRequestHandlerConverter;
091: import org.strecks.injection.handler.TestLocaleInjectionHandler;
092: import org.strecks.injection.handler.TestMessageResourcesHandler;
093: import org.strecks.injection.handler.TestRedirectParameterInjectionHandler;
094: import org.strecks.injection.handler.TestRequestHandler;
095: import org.strecks.injection.handler.TestRequestInjectionHandler;
096: import org.strecks.injection.handler.TestRequestParameterHandler;
097: import org.strecks.injection.handler.TestRequestSessionHandler;
098: import org.strecks.injection.handler.TestResponseInjectionHandler;
099: import org.strecks.injection.handler.TestSpringBeanHandler;
100: import org.strecks.injection.handler.TestWebContextInjectionHandler;
101: import org.strecks.injection.internal.TestInjectionAnnotationReader;
102: import org.strecks.interceptor.TestActionLoggingInterceptor;
103: import org.strecks.interceptor.TestHistoryRecorder;
104: import org.strecks.interceptor.TestRedirectBeforeInterceptor;
105: import org.strecks.interceptor.internal.TestActionBeanInterceptorReader;
106: import org.strecks.interceptor.internal.TestDefaultInterceptorReader;
107: import org.strecks.lifecycle.impl.TestInitMethodReader;
108: import org.strecks.message.TestMessageResourcesHelper;
109: import org.strecks.navigate.factory.TestDefaultNavigationHandlerFactory;
110: import org.strecks.navigate.handler.TestActionForwardNavigationHandler;
111: import org.strecks.navigate.handler.TestActionRedirectNavigationHandler;
112: import org.strecks.navigate.handler.TestMappingNavigationHandler;
113: import org.strecks.navigate.handler.TestPageNavigationHandler;
114: import org.strecks.navigate.internal.TestNavigateReader;
115: import org.strecks.navigate.internal.TestNavigationReader;
116: import org.strecks.navigate.spring.TestSpringNavigationHandler;
117: import org.strecks.navigate.spring.TestSpringNavigationReader;
118: import org.strecks.navigate.spring.TestSpringRenderingViewAdapter;
119: import org.strecks.navigate.spring.TestStrecksLocaleResolver;
120: import org.strecks.preprocess.TestEmptyPreprocess;
121: import org.strecks.source.TestBeanSourceReader;
122: import org.strecks.source.TestDefaultActionBeanSource;
123: import org.strecks.source.TestSpringActionBeanSource;
124: import org.strecks.util.TestCollectionUtils;
125: import org.strecks.util.TestPropertyValueGetter;
126: import org.strecks.util.TestPropertyValueSetter;
127: import org.strecks.util.TestReflectHelper;
128: import org.strecks.util.TestStringUtils;
129: import org.strecks.validator.TestValidationAnnotationReader;
130: import org.strecks.validator.TestValidators;
131: import org.strecks.validator.factory.TestBaseFactory;
132: import org.strecks.validator.internal.TestConvertedTypeValidationChecker;
133: import org.strecks.validator.internal.TestMethodValidators;
134: import org.strecks.validator.internal.TestOrderedProperty;
135: import org.strecks.validator.internal.TestSortableValidator;
136: import org.strecks.validator.internal.TestValidationAnnotationReaderImpl;
137: import org.strecks.validator.strategy.TestDefaultValidationStrategy;
138: import org.strecks.view.TestActionForwardViewAdapter;
139: import org.strecks.web.TestRedirectHelperImpl;
140: import org.strecks.web.TestWebHelperImpl;
141: import org.strecks.web.form.TestProjectFormBinding;
142: import org.strecks.web.form.TestProjectFormValidation;
143: import org.testng.annotations.Factory;
144:
145: /**
146: * @author Phil Zoio
147: */
148: public class AllTestFactory extends BaseFactory {
149:
150: @Factory
151: public Object[] createInstances() {
152: List<Object> list = getAll();
153: return list.toArray();
154: }
155:
156: protected List<Object> getAll() {
157:
158: List<Object> list = new ArrayList<Object>();
159:
160: add(list, TestBaseBasicController.class);
161: add(list, TestBasicController.class);
162: add(list, TestBasicFormController.class);
163: add(list, TestBasicSubmitController.class);
164: add(list, TestBasicLookupDispatchController.class);
165: add(list, TestBasicDispatchController.class);
166: add(list, TestBasicMappingDispatchController.class);
167: add(list, TestNavigableReadOnlyController.class);
168: add(list, TestNavigableDispatchController.class);
169: add(list, TestNavigableFormController.class);
170: add(list, TestNavigableLookupDispatchController.class);
171: add(list, TestNavigableMappingDispatchController.class);
172: add(list, TestNavigableSubmitController.class);
173: add(list, TestBindablesReader.class);
174: add(list, TestBindSimpleHandler.class);
175: add(list, TestBindSimpleHandlerMethods.class);
176: add(list, TestAbstractBindHandler.class);
177: add(list, TestBindSelectHandler.class);
178: add(list, TestBindSelectHandlerMethods.class);
179: add(list, TestBind.class);
180: add(list, TestBeanUtilsConverter.class);
181: add(list, TestBlankToNullStringConverter.class);
182: add(list, TestDateFormatConverter.class);
183: add(list, TestDatePatternConverter.class);
184: add(list, TestSafeBeanUtilsConverter.class);
185: add(list, TestStringConverter.class);
186: add(list, TestConverterReader.class);
187: add(list, TestDefaultConversionHandler.class);
188: add(list, TestDispatchMethodLookupReader.class);
189: add(list, TestDispatchControllerHelper.class);
190: add(list, TestBindableReaderImpl.class);
191: add(list, TestReadBindablesWithConverter.class);
192: add(list, TestBootStrapper.class);
193: add(list, TestConfigUtils.class);
194: add(list, TestPropertiesBuilder.class);
195: add(list, TestInterceptorBuilderImpl.class);
196: add(list, TestActionContextImpl.class);
197: add(list, TestReflectHelper.class);
198: add(list, TestPropertyValueSetter.class);
199: add(list, TestPropertyValueGetter.class);
200: add(list, TestCollectionUtils.class);
201: add(list, TestForm.class);
202: add(list, TestDelegatingForm.class);
203: add(list, TestDelegatingFormBinding.class);
204: add(list, TestDelegatingFormValidation.class);
205: add(list, TestFormBinding.class);
206: add(list, TestFormPopulateSourceImpl.class);
207: add(list, TestValidBindFormHandler.class);
208: add(list, TestDefaultValidationStrategy.class);
209: add(list, TestFormValidationHandlerImpl.class);
210: add(list, TestObjectFormBinding.class);
211: add(list, TestObjectValidator.class);
212: add(list, SelectForm.class);
213: add(list, TestSelectFormBinding.class);
214: add(list, TestValidatorWrapper.class);
215: add(list, TestInitMethodReader.class);
216: add(list, TestStringUtils.class);
217: add(list, TestValidationAnnotationReader.class);
218: add(list, TestConvertedTypeValidationChecker.class);
219: add(list, TestMethodValidators.class);
220: add(list, TestOrderedProperty.class);
221: add(list, TestSortableValidator.class);
222: add(list, TestValidationAnnotationReaderImpl.class);
223: add(list, TestActionForwardViewAdapter.class);
224: add(list, TestValidators.class);
225: add(list, TestBaseFactory.class);
226: add(list, TestActionCreator.class);
227: add(list, TestBaseControllerAction.class);
228: add(list, TestNavigableControllerAction.class);
229: add(list, TestControllerRequestProcessor.class);
230: add(list, TestImplicitActionCreation.class);
231: add(list, TestControllerProcessorDelegateImpl.class);
232: add(list, TestAnnotationChecker.class);
233: add(list, TestInjectionSetter.class);
234: add(list, TestInvalidRequestConverter.class);
235: add(list, TestActionFormInjectionHandler.class);
236: add(list, TestActionMappingInjectionHandler.class);
237: add(list, TestAutoCreateAction.class);
238: add(list, TestInjectionAnnotationReader.class);
239: add(list, TestRedirectBeforeInterceptor.class);
240: add(list, TestActionBeanInterceptorReader.class);
241: add(list, TestDefaultInterceptorReader.class);
242: add(list, TestMessageResourcesHelper.class);
243: add(list, TestActionLoggingInterceptor.class);
244: add(list, TestHistoryRecorder.class);
245: add(list, TestRequestHandler.class);
246: add(list, TestRedirectHelperImpl.class);
247: add(list, TestContextInjectionHandler.class);
248: add(list, TestInvalidRequestHandlerConverter.class);
249: add(list, TestMessageResourcesHandler.class);
250: add(list, TestLocaleInjectionHandler.class);
251: add(list, TestRequestInjectionHandler.class);
252: add(list, TestResponseInjectionHandler.class);
253: add(list, TestRequestParameterHandler.class);
254: add(list, TestRequestSessionHandler.class);
255: add(list, TestRedirectParameterInjectionHandler.class);
256: add(list, TestSpringBeanHandler.class);
257: add(list, TestWebContextInjectionHandler.class);
258: add(list, TestMappingNavigationHandler.class);
259: add(list, TestActionForwardNavigationHandler.class);
260: add(list, TestPageNavigationHandler.class);
261: add(list, TestActionRedirectNavigationHandler.class);
262: add(list, TestDefaultNavigationHandlerFactory.class);
263: add(list, TestNavigationReader.class);
264: add(list, TestSpringNavigationHandler.class);
265: add(list, TestSpringNavigationReader.class);
266: add(list, TestSpringRenderingViewAdapter.class);
267: add(list, TestStrecksLocaleResolver.class);
268: add(list, TestNavigateReader.class);
269: add(list, TestBeanSourceReader.class);
270: add(list, TestEmptyPreprocess.class);
271: add(list, TestDefaultActionBeanSource.class);
272: add(list, TestSpringActionBeanSource.class);
273: add(list, TestProjectFormBinding.class);
274: add(list, TestProjectFormValidation.class);
275: add(list, TestWebHelperImpl.class);
276: add(list, TestRedirectHelperImpl.class);
277:
278: add(list, TestCreateAction.class);
279: add(list, TestDelegatingProcessActionForm.class);
280: add(list, TestExecuteAction.class);
281: add(list, TestPopulateActionForm.class);
282: add(list, TestPreprocess.class);
283: add(list, TestRegularProcessActionForm.class);
284: add(list, TestValidateActionForm.class);
285:
286: return list;
287: }
288:
289: }
|