Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 16
0
        public GetWorkingStatusesListTest()
        {
            var cache = new Mock <IDistributedCache>();

            _context      = InitAndGetDbContext(out _adminUserId, out _tenantId);
            _queryHandler = new GetWorkingStatusesListQueryHandler(_context, new CacheManager(cache.Object));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 19
0
 public CreateTagCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _cacheService = cacheService;
     _context      = context;
 }
Exemplo n.º 20
0
 public UpdateTraineeUserCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
Exemplo n.º 21
0
 public GetTenantsListQueryTest()
 {
     _context      = InitAndGetDbContext(out _testTenantGuid, out _adminUserId);
     _queryHandler = new GetTenantsListQueryHandler(_context);
 }
Exemplo n.º 22
0
 public UpdateWorkingStatusCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
 public GetTrainingCategoriesListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
Exemplo n.º 24
0
 public GetQuestionTypesListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
Exemplo n.º 25
0
 public GetClassroomsListQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
 public AuthenticateAdminUserCommandHandler(HonoplayDbContext context)
 {
     _context = context;
 }
Exemplo n.º 27
0
 public UpdateQuestionCommandHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
Exemplo n.º 28
0
 public GetTagDetailQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }
Exemplo n.º 29
0
 public GetTenantsListQueryHandler(HonoplayDbContext context)
 {
     _context = context;
 }
 public GetTagsListByQuestionIdQueryHandler(HonoplayDbContext context, ICacheService cacheService)
 {
     _context      = context;
     _cacheService = cacheService;
 }