public void TestMethodAddSet() { var f = new TMemory <Frac>(); f.WriteMemory(new Frac(1, 5)); var otvet = new Frac(1, 5); Assert.AreEqual(otvet.Denominator, f.ReadNumber().Denominator); Assert.AreEqual(otvet.Numerator, f.ReadNumber().Numerator); }
public void TestMethodClear() { TMemory <Frac> f = new TMemory <Frac>(); f.WriteMemory(new Frac(5, 6)); var otvet = new Frac(5, 6); Assert.AreEqual(otvet.Denominator, f.ReadNumber().Denominator); Assert.AreEqual(otvet.Numerator, f.ReadNumber().Numerator); f.Clear(); otvet = new Frac(); Assert.AreEqual(otvet.Denominator, f.ReadNumber().Denominator); Assert.AreEqual(otvet.Numerator, f.ReadNumber().Numerator); }