だからここに私のコードがあります:
package tests;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
class StatementTester extends TestCase {
public StatementTester (String name) {
super(name);
}
protected void setUp() {
}
protected void tearDown() {
}
public void test1() {
System.out.println("testing");
assert(true);
}
public static Test suite() {
TestSuite suite= new TestSuite();
suite.addTest(new StatementTester("test1"));
return suite;
}
public static void main (String[] args) {
junit.textui.TestRunner.run (suite());
}
}
これを実行しようとすると、次のエラー メッセージが表示されます。
.E
Time: 0.001
There was 1 error:
1) test1(tests.StatementTester) at tests.StatementTester.main(StatementTester.java:30)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
Martin Fowler の「Refactoring: Improving the design of existing code」の第 4 章にある例に基づいてコードを作成しました (単純化しましたが、基本構造は同じです)。また、Eclipse 3.5.1 を実行し、JUnit 3 ライブラリを使用します (関連性はわかりませんが、とにかく...)
私が間違っていることについて何かヒントを教えてもらえますか?