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

            _context = InitAndGetDbContext(out _avatarId);
            _getAvatarDetailQueryHandler = new GetAvatarDetailQueryHandler(_context, new CacheManager(cache.Object));
        }
        public GetTraineeUserDetailQueryTest()
        {
            var distributedCacheMock = new Mock <IDistributedCache>();

            _context      = InitAndGetDbContext(out _adminUserId, out _traineeUserId, out _tenantId);
            _queryHandler = new GetTraineeUserDetailQueryHandler(_context, new CacheManager(distributedCacheMock.Object));
        }
예제 #3
0
        public CreateTrainingCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _tenantId, out _adminUserId, out _trainingSeriesId, out _trainingCategoryId);
            _commandHandler = new CreateTrainingCommandHandler(_context, new CacheManager(cache.Object));
        }
        public GetQuestionTypesListQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext();
            _getQuestionTypesListQueryHandler = new GetQuestionTypesListQueryHandler(_context, new CacheManager(cache.Object));
        }
        public GetQuestionDifficultyDetailQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _questionDifficultyId);
            _getQuestionDifficultyDetailQueryHandler = new GetQuestionDifficultyDetailQueryHandler(_context, new CacheManager(cache.Object));
        }
예제 #6
0
        public UpdateOptionCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _adminUserId, out _questionId, out _tenantId, out _optionId);
            _updateOptionCommandHandler = new UpdateOptionCommandHandler(_context, new CacheManager(cache.Object));
        }
        public UpdateTraineeGroupCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _tenantId, out _adminUserId, out _traineeGroupId);
            _commandHandler = new UpdateTraineeGroupCommandHandler(_context, new CacheManager(cache.Object));
        }
예제 #8
0
        public CreateTrainerUserCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _professionId, out _departmentId, out _adminUserId, out _tenantId);
            _commandHandler = new CreateTrainerUserCommandHandler(_context, new CacheManager(cache.Object));
        }
        public GetTrainingsListByTrainingSeriesIdQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _tenantId, out _adminUserId, out _trainingSeriesId);
            _getTrainingsListByTrainingSeriesIdQueryHandler = new GetTrainingsListByTrainingSeriesIdQueryHandler(_context, new CacheManager(cache.Object));
        }
예제 #10
0
        public GetOptionDetailQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _tenantId, out _optionId, out _adminUserId);
            _getOptionDetailQueryHandler = new GetOptionDetailQueryHandler(_context, new CacheManager(cache.Object));
        }
예제 #11
0
        public UpdateSessionCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _tenantId, out _adminUserId, out _gameId, out _classroomId, out _sessionId);
            _commandHandler = new UpdateSessionCommandHandler(_context, new CacheManager(cache.Object));
        }
예제 #12
0
        public GetSessionsListQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _tenantId);
            _getSessionsListQueryHandler = new GetSessionsListQueryHandler(_context, new CacheManager(cache.Object));
        }
        public GetTrainingCategoryDetailQueryTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _trainingCategoryId);
            _getTrainingCategoryDetailQueryHandler = new GetTrainingCategoryDetailQueryHandler(_context, new CacheManager(cache.Object));
        }
        public CreateContentFileCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context = InitAndGetDbContext(out _adminUserId, out _tenantId);
            _createContentFileCommandHandler = new CreateContentFileCommandHandler(_context, new CacheManager(cache.Object));
        }
        public UpdateTraineeUserCommandTest()
        {
            var distributedCacheMock = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _workingStatusId, out _departmentId, out _adminUserId, out _traineeUserId, out _tenantId);
            _commandHandler = new UpdateTraineeUserCommandHandler(_context, new CacheManager(distributedCacheMock.Object));
        }
예제 #16
0
        public GetWorkingStatusesListTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context      = InitAndGetDbContext(out _adminUserId, out _tenantId);
            _queryHandler = new GetWorkingStatusesListQueryHandler(_context, new CacheManager(cache.Object));
        }
예제 #17
0
        public UpdateWorkingStatusCommandTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context        = InitAndGetDbContext(out _adminUserId, out _workingStatusId, out _tenantId);
            _commandHandler = new UpdateWorkingStatusCommandHandler(_context, new CacheManager(cache.Object));
        }
예제 #18
0
        protected HonoplayDbContext GetDbContext()
        {
            var builder = new DbContextOptionsBuilder <HonoplayDbContext>();

            var connectionStringBuilder = new SqliteConnectionStringBuilder {
                DataSource = ":memory:"
            };
            var connectionString = connectionStringBuilder.ToString();
            var connection       = new SqliteConnection(connectionString);

            builder.UseSqlite(connection).ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning));

            var dbContext = new HonoplayDbContext(builder.Options);

            dbContext.Database.OpenConnection();
            dbContext.Database.EnsureCreated();
            return(dbContext);
        }
예제 #19
0
 public CreateTagCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _cacheService = cacheService;
     _context      = context;
 }
예제 #20
0
 public UpdateTraineeUserCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
예제 #21
0
 public GetTenantsListQueryTest()
 {
     _context      = InitAndGetDbContext(out _testTenantGuid, out _adminUserId);
     _queryHandler = new GetTenantsListQueryHandler(_context);
 }
예제 #22
0
 public UpdateWorkingStatusCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
 public GetTrainingCategoriesListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
예제 #24
0
 public GetQuestionTypesListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
예제 #25
0
 public GetClassroomsListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
 public AuthenticateAdminUserCommandHandler(HonoplayDbContext context)
 {
     _context = context;
 }
예제 #27
0
 public UpdateQuestionCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
예제 #28
0
 public GetTagDetailQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
예제 #29
0
 public GetTenantsListQueryHandler(HonoplayDbContext context)
 {
     _context = context;
 }
 public GetTagsListByQuestionIdQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }