public void Detach_DoesNotThrow() { var messageBoard = new MessageBoard(); var observerMock = new Mock <IMessageBoardObserver>(); Assert.DoesNotThrow(() => messageBoard.Detach(observerMock.Object)); }
public void Detach_NullObserver_ArgumentNullException() { var messageBoard = new MessageBoard(); var ex = Assert.Throws <ArgumentNullException>(() => messageBoard.Detach(null)); Assert.That(ex.ParamName, Is.EqualTo(DetachObserverParam)); }