public void FindAllDocuments_DoNotReturnNonExistingDocument()
        {
            InNewTempDirectory(path =>
            {
                var destFile = Path.Combine(path, "text.txt");

                var source = new SingleFileDocumentSource(destFile);
                var list   = source.FindAllDocuments().ToList().Wait();
                Assert.That(list, Is.Empty);
            });
        }
        public void FindAllDocuments_ReturnsExistingDocument()
        {
            InNewTempDirectory(path =>
            {
                var destFile = CopyContentFilesTo("text.txt", path).Single();

                var source = new SingleFileDocumentSource(destFile);
                var list   = source.FindAllDocuments().ToList().Wait();
                Assert.That(list, Has.Count.EqualTo(1));
                Assert.That(list.Select(d => d.Id).Single(), Is.EqualTo(destFile).IgnoreCase);
            });
        }
        public void FindAllDocuments_WhenFolderDoesNotExist_Fail()
        {
            var source = new SingleFileDocumentSource(Path.Combine(GetNewTempDirectoryPath(), "text.txt"));

            Assert.That(IgnoreEventsReturnError(source.FindAllDocuments()).Wait(), Is.Not.Null);
        }