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)); }
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)); }
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)); }
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)); }
public GetOptionDetailQueryTest() { var cache = new Mock <IDistributedCache>(); _context = InitAndGetDbContext(out _tenantId, out _optionId, out _adminUserId); _getOptionDetailQueryHandler = new GetOptionDetailQueryHandler(_context, new CacheManager(cache.Object)); }
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)); }
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)); }
public GetWorkingStatusesListTest() { var cache = new Mock <IDistributedCache>(); _context = InitAndGetDbContext(out _adminUserId, out _tenantId); _queryHandler = new GetWorkingStatusesListQueryHandler(_context, new CacheManager(cache.Object)); }
public UpdateWorkingStatusCommandTest() { var cache = new Mock <IDistributedCache>(); _context = InitAndGetDbContext(out _adminUserId, out _workingStatusId, out _tenantId); _commandHandler = new UpdateWorkingStatusCommandHandler(_context, new CacheManager(cache.Object)); }
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); }
public CreateTagCommandHandler(HonoplayDbContext context, ICacheService cacheService) { _cacheService = cacheService; _context = context; }
public UpdateTraineeUserCommandHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetTenantsListQueryTest() { _context = InitAndGetDbContext(out _testTenantGuid, out _adminUserId); _queryHandler = new GetTenantsListQueryHandler(_context); }
public UpdateWorkingStatusCommandHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetTrainingCategoriesListQueryHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetQuestionTypesListQueryHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetClassroomsListQueryHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public AuthenticateAdminUserCommandHandler(HonoplayDbContext context) { _context = context; }
public UpdateQuestionCommandHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetTagDetailQueryHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }
public GetTenantsListQueryHandler(HonoplayDbContext context) { _context = context; }
public GetTagsListByQuestionIdQueryHandler(HonoplayDbContext context, ICacheService cacheService) { _context = context; _cacheService = cacheService; }