public void CanDeleteCurrentEntry() { var engine = new Engine(); engine.Digit(1); Assert.AreEqual(1, engine.Value); engine.ClearEntry(); Assert.AreEqual(0, engine.Value); }
public void CanDeleteCurrentEntryWhenOperatorIsOnStack() { var engine = new Engine(); engine.Digit(1); Assert.AreEqual(1, engine.Value); engine.Plus(); Assert.AreEqual(1, engine.Value); engine.ClearEntry(); Assert.AreEqual(0, engine.Value); engine.Digit(2); Assert.AreEqual(2, engine.Value); engine.Equals(); Assert.AreEqual(3, engine.Value); }