1
測試抽象類的構造函數有一個簡單的方法使用JUnit測試來測試下面的構造在抽象類Woning:使用JUnit
public abstract class Woning {
private int kamers;
private int vraagPrijs;
private Adres adres;
private boolean statusWoning;
public Woning(Adres adres, int kamers, int vraagPrijs, boolean statusWoning) {
this.adres = adres;
this.kamers = kamers;
this.vraagPrijs = vraagPrijs;
this.statusWoning = statusWoning;
}
[如何使用jUnit測試Java中的抽象類?](http://stackoverflow.com/questions/7569444/how-to-test-abstract-class-in-java-with-junit) –