001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * bstefanescu 018 */ 019package org.nuxeo.runtime.test.runner; 020 021import org.junit.runners.model.FrameworkMethod; 022 023import com.google.inject.Binder; 024 025/** 026 * These are the states the runner goes through when using runtime feature: 027 * 028 * <pre> 029 * CREATE FRAMEWORK 030 * new feature() --> constructor 031 * COLLECT DEFINED DEPLOYMENTS 032 * feature.initialize() --> can be used to configure nuxeo home or register JNDI objects 033 * START FRAMEWORK 034 * feature.start() 035 * feature.beforeRun() 036 * feature.configure() --> can be used to add guice bindings and to dynamically deploy components using the harness 037 * for each test method: 038 * feature.testCreated() 039 * feature.beforeSetup 040 * feature.beforeMethodRun() --> test method interceptor 041 * testMethod() 042 * feature.afterMethodRun() --> test method interceptor 043 * feature.afterTeardown() 044 * feature.afterRun() --> cleanup that require framework to be started 045 * STOP FRAMEWORK 046 * feature.stop() --> destructor 047 * </pre> 048 * 049 * @author <a href="mailto:[email protected]">Bogdan Stefanescu</a> 050 * @deprecated since 10.3, implements directly {@link RunnerFeature} 051 */ 052@Deprecated 053public class SimpleFeature implements RunnerFeature { 054 055 @Override 056 public void afterRun(FeaturesRunner runner) throws Exception { 057 } 058 059 @Override 060 public void beforeRun(FeaturesRunner runner) throws Exception { 061 } 062 063 @Override 064 public void start(FeaturesRunner runner) throws Exception { 065 } 066 067 @Override 068 public void testCreated(Object test) throws Exception { 069 } 070 071 @Override 072 public void stop(FeaturesRunner runner) throws Exception { 073 } 074 075 @Override 076 public void configure(FeaturesRunner runner, Binder binder) { 077 } 078 079 @Override 080 public void initialize(FeaturesRunner runner) throws Exception { 081 } 082 083 @Override 084 public void afterMethodRun(FeaturesRunner runner, FrameworkMethod method, Object test) throws Exception { 085 } 086 087 @Override 088 public void beforeMethodRun(FeaturesRunner runner, FrameworkMethod method, Object test) throws Exception { 089 } 090 091 @Override 092 public void beforeSetup(FeaturesRunner runner) throws Exception { 093 094 } 095 096 @Override 097 public void afterTeardown(FeaturesRunner runner) throws Exception { 098 099 } 100 101}