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.
22 lines
892 B
22 lines
892 B
package com.ugsbo.complexnumcalc;
|
|
|
|
import static org.junit.Assert.assertTrue;
|
|
|
|
import org.junit.Test;
|
|
|
|
public class conjugationOfComplexNumbersTest {
|
|
|
|
@Test
|
|
public void TheConjugatedComplexNumberOfAComplexNumberWithOnlyARealPartShouldBeTheRealPart_ButItIsNot() {
|
|
Double realPart = Double.valueOf(4);
|
|
Double imaginaryPart = Double.valueOf(0);
|
|
ComplexNumber complexNumber = new ComplexNumber(realPart, imaginaryPart);
|
|
ComplexNumber expected = new ComplexNumber(realPart, imaginaryPart);
|
|
|
|
ComplexNumber actual = complexNumber.conjugationOf();
|
|
|
|
assertTrue("TheConjugatedComplexNumberOfAComplexNumberWithOnlyARealPartIsTheRealPart", expected.equals(actual));
|
|
//TODO change equals to equalTo
|
|
//assertThat("TheConjugatedComplexNumberOfAComplexNumberWithOnlyARealPartIsTheRealPart", expected, equalsTo(actual));
|
|
}
|
|
}
|