public void GetPeekLockControlForMessageInvokesProvider() { TestMessage testMessage = new TestMessage(); testMessage.GetPeekLockControl(); _mockMessagePeekLockControlProvider.Verify(mplcp => mplcp.GetMessagePeekLockControl(testMessage), Times.Once()); }
public void AttemptingToGetPeekLockControlForNullMessageThrows() { TestMessage message = null; Action action = () => message.GetPeekLockControl(); action.ShouldThrow <ArgumentNullException>() .And.ParamName.Should().Be("message"); }