1

Is there a simple way to test the following constructor in abstract class Woning with JUnit tests:

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;
}
Zimbabaluba
  • 588
  • 1
  • 8
  • 24
  • 1
    Possible duplicate of [How to test abstract class in Java with jUnit?](http://stackoverflow.com/questions/7569444/how-to-test-abstract-class-in-java-with-junit) – Stefan Birkner Nov 05 '15 at 19:55

1 Answers1

0

I would create a class which would extend it for the unit test just like we sometimes create mock classes, and create a constructor that calls the super constructor.