1 /* 2 * Copyright 2007 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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.mockftpserver.test; 17 18 import junit.framework.TestResult; 19 import junit.framework.TestSuite; 20 21 /** 22 * The absttract superclass for TestSuites that allow registering 23 * TestSuiteListeners to add customized behavior before and after the 24 * test suite is executed. 25 * 26 * @version $Revision$ - $Date$ 27 * 28 * @author Chris Mair 29 */ 30 public class AbstractTestSuite extends TestSuite { 31 32 /** 33 * Constructor that takes the test name 34 * @param testName Name of test 35 */ 36 public AbstractTestSuite() {} 37 38 //----------------------------------------------------------- 39 // Overridden TestSuite Methods 40 //----------------------------------------------------------- 41 42 /** 43 * Override this method to insert hooks for before and after the test suite run 44 * @see junit.framework.Test#run(junit.framework.TestResult) 45 */ 46 public void run(TestResult arg0) { 47 48 LoggingUtil loggingUtil = LoggingUtil.getTestSuiteLogger(this); 49 loggingUtil.logStartOfTest(); 50 51 // Run this test suite 52 super.run(arg0); 53 54 loggingUtil.logEndOfTest(); 55 } 56 57 } 58