01: /* DdTestCaseHooks.java
02: *
03: * DDSteps - Data Driven JUnit Test Steps
04: * Copyright (C) 2005 Jayway AB
05: * www.ddsteps.org
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License version 2.1 as published by the Free Software Foundation.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, visit
18: * http://www.opensource.org/licenses/lgpl-license.php
19: */
20:
21: package org.ddsteps.junit.behaviour;
22:
23: /**
24: * Interface containing the method and row setUp and tearDown callbacks which are specific to DDSteps.
25: *
26: * @author adam
27: * @version $Id: DdTestCaseHooks.java,v 1.1 2006/01/29 21:25:39 adamskogman Exp $
28: */
29: public interface DdTestCaseHooks {
30:
31: /**
32: * Hook method, called on the iteration instance before running a test method. Not called if a method is not data
33: * driven.
34: *
35: * @throws Exception
36: */
37: void setUpAfterData() throws Exception;
38:
39: /**
40: * Hook method, called ONCE on the iteration instance before running a test method and its iterations. Not called if
41: * a method is not data driven.
42: *
43: * @throws Exception
44: */
45: void setUpBeforeData() throws Exception;
46:
47: /**
48: * Hook method, called once on the method instance before running a test method.
49: *
50: * @throws Exception
51: */
52: void setUpMethod() throws Exception;
53:
54: /**
55: * Hook method, called on the iteration instance after running a test method. Useful when you need some data to do
56: * tearDown. Not called if a method is not data driven.
57: *
58: * @throws Exception
59: */
60: void tearDownBeforeData() throws Exception;
61:
62: /**
63: * Hook method, called on the iteration instance after running a test method. Useful when you need some data to do
64: * tearDown. Not called if a method is not data driven.
65: *
66: * @throws Exception
67: */
68: void tearDownAfterData() throws Exception;
69:
70: /**
71: * Hook method, called ONCE on the method instance after running a test method and all its iterations.
72: *
73: * @throws Exception
74: */
75: void tearDownMethod() throws Exception;
76:
77: }
|