public void TestTFracInt() { var tfr = new TFrac.Frac(845, 4895); Assert.AreEqual(tfr.Numerator, 845); Assert.AreEqual(tfr.Denominator, 4895); }
public void TestTFracStr1() { var tfr = new TFrac.Frac("77/88"); Assert.AreEqual(tfr.Numerator, 77); Assert.AreEqual(tfr.Denominator, 88); }
public override bool Equals(object obj) { Frac frac = (Frac)obj; if ((frac.Numerator == this.Numerator) && (this.Denominator == frac.Denominator)) { return(true); } else { return(false); } }