예제 #1
0
        public void Remove_Where_ItemsDoesntExist_Expect_False()
        {
            ExecutionStatusCallbackDispatcher _executionStatusCallbackDispatcher = new ExecutionStatusCallbackDispatcher();

            Guid guid = Guid.NewGuid();

            bool expected = false;
            bool actual   = _executionStatusCallbackDispatcher.Remove(guid);

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void Remove_Where_ItemsExists_Expect_True()
        {
            ExecutionStatusCallbackDispatcher _executionStatusCallbackDispatcher = new ExecutionStatusCallbackDispatcher();

            Guid guid = Guid.NewGuid();
            Action <ExecutionStatusCallbackMessage> callback = new Action <ExecutionStatusCallbackMessage>(m => { });

            _executionStatusCallbackDispatcher.Add(guid, callback);

            bool expected = true;
            bool actual   = _executionStatusCallbackDispatcher.Remove(guid);

            Assert.AreEqual(expected, actual);
        }