SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- using NUnit.Framework;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Delegates.Observers
- {
- [TestFixture]
- public class ObservableStack_Tests
- {
- [Test]
- public void Log_ShouldBeEmpty_AfterCreation()
- {
- var stack = new ObservableStack<int>();
- var helper = new StackOperationsLogger();
- helper.SubscribeOn(stack);
- Assert.AreEqual("", helper.GetLog());
- }
- [Test]
- 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());
- }
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.