Example #1
0
        public async Task Google_ProcessFetcher_ResolveSequence_MaxCase_DefaultMaxSequence()
        {
            IStorageClient storageClient          = new S3ClientMaxMock();
            IPageFetcherSequenceResolver resolver = new GooglePageFetcherSequenceResolver(storageClient);

            int?expectedSequence = null;
            int?actualSequence   = await resolver.Resolve("any word", DateTime.Now);

            Assert.IsTrue(expectedSequence == actualSequence);
        }
Example #2
0
        public async Task Google_ProcessFetcher_ResolveSequence_BelowMaxCase_UpdatedMaxSequence()
        {
            IStorageClient storageClient = new S3ClientBelowMaxUpdatedSequenceMock();
            GooglePageFetcherSequenceResolver resolver = new GooglePageFetcherSequenceResolver(storageClient);

            resolver.MaxSequence = 10;

            int?expectedSequence = 5;
            int?actualSequence   = await resolver.Resolve("any word", DateTime.Now);

            Assert.IsTrue(expectedSequence == actualSequence);
        }