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

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

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

            record.Should().NotBeNull();
        }
Beispiel #2
0
        public async void Create()
        {
            Mock <ILogger <PipelineStepStepRequirementRepository> > loggerMoc = PipelineStepStepRequirementRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = PipelineStepStepRequirementRepositoryMoc.GetContext();
            var repository = new PipelineStepStepRequirementRepository(loggerMoc.Object, context);

            var entity = new PipelineStepStepRequirement();

            entity.SetProperties(default(int), "B", 1, true);
            await repository.Create(entity);

            var records = await context.Set <PipelineStepStepRequirement>().ToListAsync();

            records.Count.Should().Be(2);
        }