常用方法
常用方法
常用方法
常用方法
public void AddMessageListener_ShouldRegisterAMessageListener() { var mockMessageHandler = new Mock <IMessageHandler>(); var executor = new Executor(mockMessageHandler.Object, Mock.Of <ITimeProvider>()); var messageListener = Mock.Of <IMessageListener>(); executor.AddMessageListener(messageListener); mockMessageHandler.Verify(handler => handler.AddListener(messageListener)); }