~ubuntu-branches/ubuntu/quantal/junitperf/quantal

« back to all changes in this revision

Viewing changes to samples/ExampleTestCase.java

  • Committer: Bazaar Package Importer
  • Author(s): Takashi Okamoto
  • Date: 2002-02-16 22:10:09 UTC
  • Revision ID: james.westby@ubuntu.com-20020216221009-4tnw5ukk81xfolug
Tags: upstream-1.6
ImportĀ upstreamĀ versionĀ 1.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import java.io.*;
 
2
import java.net.*;
 
3
import java.util.*;
 
4
 
 
5
import junit.framework.Test;
 
6
import junit.framework.TestCase;
 
7
import junit.framework.TestSuite;
 
8
 
 
9
/**
 
10
 * The <code>ExampleTestCase</code> is an example
 
11
 * stateless <code>TestCase</code>.
 
12
 *
 
13
 * @author <a href="mailto:mike@clarkware.com">Mike Clark</a>
 
14
 * @author <a href="http://www.clarkware.com">Clarkware Consulting, Inc.</a>
 
15
 *
 
16
 * @see junit.framework.TestCase
 
17
 */
 
18
 
 
19
public class ExampleTestCase extends TestCase {
 
20
 
 
21
        /**
 
22
         * Constructs an <code>ExampleTestCase</code>
 
23
         * with the specified name.
 
24
         *
 
25
         * @param name Test name.
 
26
         */
 
27
    public ExampleTestCase(String name) {
 
28
        super(name);
 
29
    }
 
30
 
 
31
        /**
 
32
         * Sets up the test fixture.
 
33
         */
 
34
        protected void setUp() {
 
35
        }
 
36
 
 
37
        /**
 
38
         * Tears down the test fixture.
 
39
         */
 
40
        protected void tearDown() {
 
41
        }
 
42
 
 
43
        public void testOneSecondResponse() throws Exception {
 
44
                Thread.sleep(1000);
 
45
        }
 
46
        
 
47
        /**
 
48
         * Assembles and returns a test suite for all
 
49
         * the test methods of this class.
 
50
         *
 
51
         * @return A non-null <code>Test</code> instance.
 
52
         */
 
53
        public static Test suite() {
 
54
                TestSuite suite = new TestSuite(ExampleTestCase.class);
 
55
                return suite;
 
56
        }
 
57
 
 
58
        /**
 
59
         * Main.
 
60
         */
 
61
        public static void main(String args[]) {
 
62
                junit.textui.TestRunner.run(suite());
 
63
        }
 
64
}