Ejemplo n.º 1
0
        public async void All()
        {
            Mock <ILogger <SpaceXSpaceFeatureRepository> > loggerMoc = SpaceXSpaceFeatureRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = SpaceXSpaceFeatureRepositoryMoc.GetContext();
            var repository = new SpaceXSpaceFeatureRepository(loggerMoc.Object, context);

            SpaceXSpaceFeature entity = new SpaceXSpaceFeature();

            context.Set <SpaceXSpaceFeature>().Add(entity);
            await context.SaveChangesAsync();

            var record = await repository.All();

            record.Should().NotBeEmpty();
        }