예제 #1
0
        public CreateQuestionCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _tenantId, out _adminUserId);
            _createQuestionCommandHandler = new CreateQuestionCommandHandler(_context, new CacheManager(cache.Object));
        }
 public CreateQuestionCommandHandlerTests()
 {
     _autoMocker = new AutoMocker();
     _autoMocker.Use <IMapper>(new MapperConfiguration(x => x.AddMaps(typeof(QuizProfile).Assembly)).CreateMapper());
     _questionCommandHandler = _autoMocker.CreateInstance <CreateQuestionCommandHandler>();
     _questionRepositoryMock = _autoMocker.GetMock <IRepository <Question> >();
     _quizRepositoryMock     = _autoMocker.GetMock <IRepository <Quiz> >();
 }
 public CreateQuestionCommandTests(DatabaseContextFixture fixture)
 {
     _context = fixture.Context;
     _sut     = new CreateQuestionCommandHandler(_context);
 }