public void GetGenomicVariants_When_GenomicVariantsInCache_Then_ReadFromTsvIsNotCalled()
        {
            var mockCacheService = new Mock <ICacheService>();
            var mockGeneService  = new Mock <IGeneService>();

            mockCacheService.Setup(repo => repo.TryGetGenomicVariants())
            .Returns(GetTestGenomicVariantsDictionary());
            var service = new GeneSearchService(mockCacheService.Object,
                                                mockGeneService.Object);

            service.GetGenomicVariants();

            mockGeneService.Verify(x => x.ReadGenomicVariantsFromTsv(), Times.Never());
        }
        public void GetGenomicVariants_When_GenomicVariantsNotInCache_Then_ReadFromTsvIsCalledOnce()
        {
            var mockCacheService = new Mock <ICacheService>();
            var mockGeneService  = new Mock <IGeneService>();

            mockCacheService.Setup(repo => repo.TryGetGenomicVariants())
            .Returns((Dictionary <string, List <GenomicVariant> >)null);
            mockGeneService.Setup(repo => repo.ReadGenomicVariantsFromTsv())
            .Returns((List <GenomicVariant>)null);
            mockGeneService.Setup(repo => repo.MapGenomicVariantsToDictionary(null))
            .Returns((Dictionary <string, List <GenomicVariant> >)null);
            mockCacheService.Setup(repo => repo.StoreGenomicVariants(null));
            var service = new GeneSearchService(mockCacheService.Object,
                                                mockGeneService.Object);

            service.GetGenomicVariants();

            mockGeneService.Verify(x => x.ReadGenomicVariantsFromTsv(), Times.Once());
        }