Example #1
0
        public void Detach_DoesNotThrow()
        {
            var messageBoard = new MessageBoard();
            var observerMock = new Mock <IMessageBoardObserver>();

            Assert.DoesNotThrow(() => messageBoard.Detach(observerMock.Object));
        }
Example #2
0
        public void Detach_NullObserver_ArgumentNullException()
        {
            var messageBoard = new MessageBoard();
            var ex           = Assert.Throws <ArgumentNullException>(() => messageBoard.Detach(null));

            Assert.That(ex.ParamName, Is.EqualTo(DetachObserverParam));
        }