예제 #1
0
        public void ActivateAndSendCache_WhenCalled_ShouldSendCorrect()
        {
            Mock.Arrange(() => _applicationRecorder.GetCache()).Returns(Enumerable.Empty <string>());
            _sut = new RemoteRecordsSender(_consistentMessageSender, _applicationRecorder, _recorder);

            _sut.ActivateAndSendCache();

            Mock.Assert(() => _consistentMessageSender.SendRemote(string.Empty),
                        Occurs.Exactly(1));
        }
예제 #2
0
        private void ActivateAndSendCacheInternal()
        {
            Activated = true;
            var cache = _applicationRecorder.GetCache();

            _consistentMessageSender.SendRemote(CacheToString(cache));
        }