For a homework assignment, I have created a Class called Bird, that contains a method:
public void launch()
{
System.out.println("Flapping the wings until take-off");
}
I need to run jUnit tests on all contained methods, including ones like these. However, when I use:
@Test
void testLaunch()
{
Bird myBird = new Bird("Macaw");
assertEquals("Flapping the wings to take-off", myBird.launch());
}
I'm given this error in Eclipse: "The method assertEquals(short, short) in the type Assertions is not applicable for the arguments (String, void)"
I'm becoming frustrated because our teacher has not taught us how to test these kinds of methods, and he never answers my emails for assistance. Even if this is considered an overall weak question, any help would be greatly appreciated.