public void TestFState3() { TFrac frac = new TFrac(8, 9); TMemory <TFrac> memory = new TMemory <TFrac>(frac); memory.Add(frac); TMemory <TFrac> .NumStates expected = TMemory <TFrac> .NumStates.ON; Assert.AreEqual(expected, memory.FState); }
public void Sum2() { TFrac frac = new TFrac(8, 9); TMemory <TFrac> memory = new TMemory <TFrac>(frac); TFrac summator = new TFrac(-16, 3); memory.Add(summator); string answer = "-40/9"; Assert.AreEqual(answer, memory.FNumber.ToString()); }
public void Sum1() { TFrac frac = new TFrac(-1, 5); TMemory <TFrac> memory = new TMemory <TFrac>(frac); TFrac summator = new TFrac(1, 2); memory.Add(summator); string answer = "3/10"; Assert.AreEqual(answer, memory.FNumber.ToString()); }