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

            var entity = new SpaceXSpaceFeature();
            await repository.Create(entity);

            var record = await context.Set <SpaceXSpaceFeature>().FirstOrDefaultAsync();

            record.Should().NotBeNull();
        }