public void TestSquare() { var test1 = new TComplex(3, 4); var resulr = test1.Square(); Assert.AreEqual(resulr.real, -7); Assert.AreEqual(resulr.imaginary, 24); }
public void Square2() { TComplex testClass = new TComplex(0, -3); testClass = testClass.Square() as TComplex; string output = "-9 + i * 0"; Assert.AreEqual(output, testClass.ToString()); }
public void Square1() { TComplex testClass = new TComplex(3, 4); testClass = testClass.Square() as TComplex; string output = "-7 + i * 24"; Assert.AreEqual(output, testClass.ToString()); }