public void FetchAllMessages_ValidParams_ReturnsExpectedMessages()
        {
            // arrange
            _emailService = new EmailService(_stubEmailWatcherOptions, _fakePopClientFactory, _messageTranslator);

            // act
            List<EmailWatcherMessage> messages = _emailService.FetchAllMessages();

            // assert
            Assert.IsNotNull(messages);
            Assert.AreEqual(FakePopClientAdapter.StubMessageCount, messages.Count);
            Assert.AreEqual(FakePopClientAdapter.StubSubject, messages.FirstOrDefault().Subject);
            Assert.AreEqual(FakePopClientAdapter.StubBody + "\r\n", messages.FirstOrDefault().Body);
        }
        public void FetchAllMessages_ValidParams_InvokesPopClientAdapter()
        {
            // arrange
            _emailService = new EmailService(_stubEmailWatcherOptions, _fakePopClientFactory, _messageTranslator);

            // act
            _emailService.FetchAllMessages();

            // assert
            Assert.IsTrue(FakePopClientAdapter.HasBeenInvoked);
        }