Angepasster Prototyp
@Test
public void testPlus() {
System.out.println("plus");
Vektor that = new Vektor(1,2,3);
Vektor instance = new Vektor(2,3,5);
Vektor expResult = new Vektor(3.0,5.0,8.0);
Vektor result = instance.plus(that);
assertEquals(expResult.toString(),result.toString());
}
== Angepasster Prototyp
[source,java,indent=0 ]
----
@Test
public void testPlus() {
System.out.println("plus");
Vektor that = new Vektor(1,2,3); // Vektor für that erzeugen
Vektor instance = new Vektor(2,3,5); // unser Vektor
Vektor expResult = new Vektor(3.0,5.0,8.0); // erwartetes Resultat
Vektor result = instance.plus(that);
assertEquals(expResult.toString(),result.toString());
}
----