コード例 #1
0
        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));
        }