示例#1
0
        public void DebugDispatcher_RemoveWithValidID()
        {
            var debugDispatcher = new DebugDispatcherImplementation();
            var workspaceID     = Guid.NewGuid();
            var writer          = new Mock <IDebugWriter>();

            debugDispatcher.Add(workspaceID, writer.Object);

            debugDispatcher.Remove(workspaceID);
            var theWriter = debugDispatcher.Get(workspaceID);

            Assert.IsNull(theWriter);
        }
示例#2
0
        public void DebugDispatcher_RemoveWithInvalidID()
        {
            var debugDispatcher = new DebugDispatcherImplementation();
            var workspaceID     = Guid.NewGuid();
            var writer          = new Mock <IDebugWriter>();

            debugDispatcher.Add(workspaceID, writer.Object);

            var countBefore = debugDispatcher.Count;

            debugDispatcher.Remove(Guid.NewGuid());
            Assert.AreEqual(countBefore, debugDispatcher.Count);
        }