3、将junit.jar和$JUNITHOME/junit加入到CLASSPATH中,加入后者只因为测试例程在那个目录下。·注意不要将junit.jar放在jdk的extension目录下·运行命令,结果如右图。javajunit.swingui.TestRunnerjunit.samples.AllTests 3、Junit架构 下面以Money这个类为例进行说明。publicclassMoney{ private int fAmount;//余额 private String fCurrency;//货币类型 public M
4、oney(int amount, String currency) { fAmount= amount; fCurrency= currency; } public int amount() { return fAmount; } public String currency() { return fCurrency; } public Money add(Money m) {//加钱 return new Money(amount()