forked from Simmetrics/simmetrics
/
TestSuite.java
102 lines (96 loc) · 3.77 KB
/
TestSuite.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/**
* SimMetrics - SimMetrics is a java library of Similarity or Distance
* Metrics, e.g. Levenshtein Distance, that provide float based similarity
* measures between String Data. All metrics return consistant measures
* rather than unbounded similarity scores.
*
* Copyright (C) 2005 Sam Chapman - Open Source Release v1.1
*
* Please Feel free to contact me about this library, I would appreciate
* knowing quickly what you wish to use it for and any criticisms/comments
* upon the SimMetric library.
*
* email: s.chapman@dcs.shef.ac.uk
* www: http://www.dcs.shef.ac.uk/~sam/
* www: http://www.dcs.shef.ac.uk/~sam/stringmetrics.html
*
* address: Sam Chapman,
* Department of Computer Science,
* University of Sheffield,
* Sheffield,
* S. Yorks,
* S1 4DP
* United Kingdom,
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package uk.ac.shef.wit.simmetrics;
import junit.framework.TestCase;
import junit.textui.TestRunner;
/**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 23-Nov-2006
* Time: 13:15:07
* To change this template use File | Settings | File Templates.
*/
public class TestSuite extends TestCase {
/**
* Sets up the test fixture.
*
* Called before every test case method.
*/
protected void setUp() {
//create objects for testing
}
/**
* Tears down the test fixture.
*
* Called after every test case method.
*/
protected void tearDown() {
// release objects under test here, if necessary
}
/**
* Tests SimMetric code.
*
* @return Test results of the test
*/
static public junit.framework.Test suite() {
junit.framework.TestSuite newSuite = new junit.framework.TestSuite();
newSuite.addTest(new uk.ac.shef.wit.simmetrics.tokenisers.TestSuite("testAllTokenisers"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.similaritymetrics.TestSuite("testAllSimilarityMetrics"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.arbitrators.TestSuite("testAllArbitrators"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.basiccontainers.TestSuite("testAllBasicContainers"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.math.TestSuite("testAllMath"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.metrichandlers.TestSuite("testAllMetricHandlers"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.task.TestSuite("testAllTask"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.utils.TestSuite("testAllUtils"));
newSuite.addTest(new uk.ac.shef.wit.simmetrics.wordhandlers.TestSuite("testAllWordHandlers"));
return newSuite;
}
/**
* main method for the junit testing.
*
* @param args - unused
*/
static public void main(String[] args) {
junit.textui.TestRunner runner = new junit.textui.TestRunner();
System.exit(
TestRunner.run(runner.getTest(uk.ac.shef.wit.simmetrics.TestSuite.class.getName())).
wasSuccessful() ? 0 : 1
);
}
}