public void TestFState1() { TFrac frac = new TFrac(8, 9); TMemory <TFrac> memory = new TMemory <TFrac>(frac); memory.Clear(); TMemory <TFrac> .NumStates expected = TMemory <TFrac> .NumStates.OFF; Assert.AreEqual(expected, memory.FState); }
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); }