Example #1
0
        public async Task FindAllTechnologiesAsyncShouldFindAllDataInDatabase()
        {
            if (isMock)
            {
                var radarDatabase        = new RadarDatabase(_options.Object);
                var technologyRepository = new TechnologyRepository(radarDatabase);
                var technologies         = await technologyRepository.FindAllAsync();

                Assert.IsAssignableFrom <IEnumerable <Technology> >(technologies);
            }
        }
Example #2
0
        public async Task FindByIdAsyncShouldFindDataInDatabase()
        {
            if (isMock)
            {
                var radarDatabase        = new RadarDatabase(_options.Object);
                var technologyRepository = new TechnologyRepository(radarDatabase);
                var id         = "5c73c15a8b89521e44e98805";
                var technology = await technologyRepository.FindByIdAsync(id);

                Assert.IsType <Technology>(technology);
            }
        }