Since what you're testing here is a behavior implemented in the Car superclass, and no subclass overrides it, you don't have to repeat the test for both Saab95 and Volvo240. It is enough to do the test using one of the two.
It also appears that the name of the test does not match what the test does. Instead there is a comment explaining what the test is testing.
Since what you're testing here is a behavior implemented in the
Car
superclass, and no subclass overrides it, you don't have to repeat the test for bothSaab95
andVolvo240
. It is enough to do the test using one of the two.It also appears that the name of the test does not match what the test does. Instead there is a comment explaining what the test is testing.
https://github.com/ghazalghorabi/TDA553-lab1/blob/9064245501fc0d8910804f850959c9b46f31d00c/test/CarTest.java#L11-L24