public void InitNumber4() { TFrac fracClass = new TFrac(-100, -99); string fracCompar = "100/99"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitNumber5() { TFrac fracClass = new TFrac(0, 0); string fracCompar = "0/1"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitCopy2() { TFrac fracClass = new TFrac(1, 4); TFrac copyClass = new TFrac(fracClass); Assert.AreEqual(fracClass.ToString(), copyClass.ToString()); }
public void InitNumber2() { TFrac fracClass = new TFrac(17, 9); string fracCompar = "17/9"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitString3() { string fracString = "1/999"; TFrac fracClass = new TFrac(fracString); Assert.AreEqual(fracString, fracClass.ToString()); }
public void InitNumber3() { TFrac fracClass = new TFrac(100, 100); string fracCompar = "1/1"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitNumber1() { TFrac fracClass = new TFrac(2, 4); string fracCompar = "1/2"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitString6() { string fracString = "00000003/000004"; TFrac fracClass = new TFrac(fracString); string fracCompar = "3/4"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitString5() { string fracString = "-100/60"; TFrac fracClass = new TFrac(fracString); string fracCompar = "-5/3"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void InitString4() { string fracString = "100/10"; TFrac fracClass = new TFrac(fracString); string fracCompar = "10/1"; Assert.AreEqual(fracCompar, fracClass.ToString()); }
public void Square3() { TFrac fracClass = new TFrac(-2, 3); fracClass = fracClass.Square() as TFrac; string answer = "4/9"; Assert.AreEqual(answer, fracClass.ToString()); }
public void Square2() { TFrac fracClass = new TFrac(0, 1); fracClass = fracClass.Square() as TFrac; string answer = "0/1"; Assert.AreEqual(answer, fracClass.ToString()); }
public void Reverse3() { TFrac fracClass = new TFrac(5, 6); fracClass = fracClass.Reverse() as TFrac; string answer = "6/5"; Assert.AreEqual(answer, fracClass.ToString()); }
public void Reverse1() { TFrac fracClass = new TFrac(-2, 3); fracClass = fracClass.Reverse() as TFrac; string answer = "-3/2"; Assert.AreEqual(answer, fracClass.ToString()); }
public void Multiply3() { TFrac fracClass1 = new TFrac(1, 6); TFrac fracClass2 = new TFrac(1, 6); fracClass2 = fracClass1 * fracClass2; string answer = "1/36"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Divide5() { TFrac fracClass1 = new TFrac(2, 3); TFrac fracClass2 = new TFrac(2, 3); fracClass2 = fracClass1 / fracClass2; string answer = "1/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Divide3() { TFrac fracClass1 = new TFrac(0, 1); TFrac fracClass2 = new TFrac(5, 6); fracClass2 = fracClass1 / fracClass2; string answer = "0/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Substract4() { TFrac fracClass1 = new TFrac(-1, 6); TFrac fracClass2 = new TFrac(-1, 6); fracClass2 = fracClass1 - fracClass2; string answer = "0/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Substract2() { TFrac fracClass1 = new TFrac(5, 1); TFrac fracClass2 = new TFrac(1, 1); fracClass2 = fracClass1 - fracClass2; string answer = "4/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Multiply4() { TFrac fracClass1 = new TFrac(-1, 6); TFrac fracClass2 = new TFrac(12, 1); fracClass2 = fracClass1 * fracClass2; string answer = "-2/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Add3() { TFrac fracClass1 = new TFrac(-6, 2); TFrac fracClass2 = new TFrac(6, 2); fracClass2 = fracClass1 + fracClass2; string answer = "0/1"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Add4() { TFrac fracClass1 = new TFrac(50, 3); TFrac fracClass2 = new TFrac(0, 1); fracClass2 = fracClass1 + fracClass2; string answer = "50/3"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Divide6() { TFrac fracClass1 = new TFrac(-1, 3); TFrac fracClass2 = new TFrac(-9, 5); fracClass2 = fracClass1 / fracClass2; string answer = "5/27"; Assert.AreEqual(answer, fracClass2.ToString()); }
public void Add1() { TFrac fracClass1 = new TFrac(1, 2); TFrac fracClass2 = new TFrac(-3, 4); fracClass2 = fracClass1 + fracClass2; string answer = "-1/4"; Assert.AreEqual(answer, fracClass2.ToString()); }