public void WorkCorrectly() { var stack = new ObservableStack <int>(); var helper = new TestHandler(); helper.Initialize(stack); stack.Push(1); stack.Push(2); stack.Pop(); Assert.AreEqual("+1+2-2", helper.GetLog()); }
public void Log_ShouldContainAllOperations() { var stack = new ObservableStack <int>(); var helper = new StackOperationsLogger(); helper.SubscribeOn(stack); stack.Push(1); stack.Push(2); stack.Pop(); stack.Push(10); Assert.AreEqual("+1+2-2+10", helper.GetLog()); }