Ultra Geile Studenten Benutzer Oberfläche (UGSBO)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
659 B

  1. package com.ugsbo.complexnumcalc;
  2. import static org.junit.Assert.assertTrue;
  3. import org.junit.Test;
  4. public class MultiplyComplexNumbersTest {
  5. @Test
  6. public void multiplyTwoComplexNumbersWithoutImaginaryPart() {
  7. ComplexNumber firstFaktor = new ComplexNumber(Double.valueOf(5), Double.valueOf(0));
  8. ComplexNumber secoundFaktor = new ComplexNumber(Double.valueOf(6), Double.valueOf(0));
  9. ComplexNumber expected = new ComplexNumber(Double.valueOf(30), Double.valueOf(0));
  10. ComplexNumber product = firstFaktor.multiply(secoundFaktor);
  11. assertTrue("The product is not as expected", product.equals(expected));
  12. }
  13. }