public async void Create()
        {
            Mock <ILogger <ArtifactRepository> > loggerMoc = ArtifactRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ArtifactRepositoryMoc.GetContext();
            var repository = new ArtifactRepository(loggerMoc.Object, context);

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

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

            record.Should().NotBeNull();
        }
        public async void Get()
        {
            Mock <ILogger <ArtifactRepository> > loggerMoc = ArtifactRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ArtifactRepositoryMoc.GetContext();
            var repository = new ArtifactRepository(loggerMoc.Object, context);

            Artifact entity = new Artifact();

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

            var record = await repository.Get(entity.Id);

            record.Should().NotBeNull();
        }
        public async void Delete()
        {
            Mock <ILogger <ArtifactRepository> > loggerMoc = ArtifactRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ArtifactRepositoryMoc.GetContext();
            var      repository          = new ArtifactRepository(loggerMoc.Object, context);
            Artifact entity = new Artifact();

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

            await repository.Delete(entity.Id);

            Artifact modifiedRecord = await context.Set <Artifact>().FirstOrDefaultAsync();

            modifiedRecord.Should().BeNull();
        }
        public async void Update_Entity_Is_Not_Tracked()
        {
            Mock <ILogger <ArtifactRepository> > loggerMoc = ArtifactRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = ArtifactRepositoryMoc.GetContext();
            var      repository          = new ArtifactRepository(loggerMoc.Object, context);
            Artifact entity = new Artifact();

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

            await repository.Update(new Artifact());

            var modifiedRecord = context.Set <Artifact>().FirstOrDefaultAsync();

            modifiedRecord.Should().NotBeNull();
        }