Пример #1
0
 public ConceptsService(
     IConceptRepository conceptRepository,
     ITagRepository tagRepository)
 {
     this.conceptRepository = conceptRepository;
     this.tagRepository = tagRepository;
 }
 public LmPlatformRepositoriesContainer()
 {
     UsersRepository           = new UsersRepository(_dataContext);
     BugsRepository            = new BugsRepository(_dataContext);
     BugLogsRepository         = new BugLogsRepository(_dataContext);
     GroupsRepository          = new GroupsRepository(_dataContext);
     ProjectsRepository        = new ProjectsRepository(_dataContext);
     ProjectUsersRepository    = new ProjectUsersRepository(_dataContext);
     ProjectCommentsRepository = new ProjectCommentsRepository(_dataContext);
     StudentsRepository        = new StudentsRepository(_dataContext);
     SubjectRepository         = new SubjectRepository(_dataContext);
     TestsRepository           = new TestsRepository(_dataContext);
     TestUnlocksRepository     = new TestUnlockRepository(_dataContext);
     QuestionsRepository       = new QuestionsRepository(_dataContext);
     UsersRepository           = new UsersRepository(_dataContext);
     ModulesRepository         = new ModulesRepository(_dataContext);
     LecturerRepository        = new LecturerRepository(_dataContext);
     MessageRepository         = new MessageRepository(_dataContext);
     MaterialsRepository       = new MaterialsRepository(_dataContext);
     FoldersRepository         = new FoldersRepository(_dataContext);
     SubGroupRepository        = new SubGroupRepository(_dataContext);
     AttachmentRepository      = new AttachmentRepository(_dataContext);
     LecturesRepository        = new LecturesRepository(_dataContext);
     LabsRepository            = new LabsRepository(_dataContext);
     ProjectUsersRepository    = new ProjectUsersRepository(_dataContext);
     PracticalRepository       = new PracticalRepository(_dataContext);
     ConceptRepository         = new ConceptRepository(_dataContext);
 }
Пример #3
0
 public ConceptService(IConceptRepository concept, IStatusRepository status, IConceptMediaRepository media, IMetadataRepository meta, ILanguageRepository language, IMapper mapper, IUrlHelper urlHelper) : base(mapper, urlHelper)
 {
     _conceptRepository      = concept;
     _statusRepository       = status;
     _conceptMediaRepository = media;
     _metaRepository         = meta;
     _languageRepository     = language;
 }
Пример #4
0
 internal ConceptService(
     ICacheManager gestorCache,
     IConceptRepository ConceptRepository,
     IRepository <MonthlyConcept> monthlyconceptRepository)
 {
     this.cacheManager             = gestorCache;
     this.conceptRepository        = ConceptRepository;
     this.monthlyConceptRepository = monthlyconceptRepository;
 }
Пример #5
0
        public BaseTest()
        {
            Mock = new Mock.Mock();
            var config         = Options.Create(ConfigHelper.GetDatabaseConfiguration());
            var languageConfig = Options.Create(ConfigHelper.GetLanguageConfiguration());

            ConceptRepository = new Repositories.ConceptRepository(Mock.Database.Context, config, languageConfig);
            BaseListQuery     = BaseListQuery.DefaultValues("en");
        }
 public ConceptServiceTest()
 {
     _conceptRepository  = A.Fake <IConceptRepository>();
     _service            = new ConceptService(_conceptRepository);
     _noSearchFields     = new ConceptSearchFields();
     _conceptsInDatabase = new List <Concept>
     {
         new Concept {
             Title = "TestTitle"
         },
         new Concept {
             Title = "Another test"
         },
     };
 }
        public ConceptRepositoryFromFileDatabaseTest()
        {
            _db                 = A.Fake <IFileDB>();
            _repository         = new ConceptRepositoryFromFileDatabase(conceptsContext); // _db);
            _conceptsInDatabase = new List <Concept>
            {
                new Concept {
                    Title = "TestTitle"
                },
                new Concept {
                    Title = "Another test"
                },
                new Concept {
                    Title = "I am a concept"
                },
            };

            //A.CallTo(() => _db.ReadFromFile()).Returns(_conceptsInDatabase);
        }
Пример #8
0
 internal PaymentService(
     IThirdPartyScheduleRepository caseRepository,
     IPaymentRepository paymentRepository,
     ITransactionRepository transactionRepository,
     IConceptRepository conceptRepository,
     IRepository <Status> statusRepository,
     IRepository <AdjustmentStatus> adjustmentStatusRepository,
     IUnitOfWork unitOfWork,
     ICacheManager cacheManager,
     ITransferTypeService transferTypeService,
     IActivityLogService activityLogService)
 {
     this.thirdPartyScheduleRepository = caseRepository;
     this.paymentRepository            = paymentRepository;
     this.transactionRepository        = transactionRepository;
     this.conceptRepository            = conceptRepository;
     this.statusRepository             = statusRepository;
     this.adjustmentStatusRepository   = adjustmentStatusRepository;
     this.unitOfWork          = unitOfWork;
     this.cacheManager        = cacheManager;
     this.transferTypeService = transferTypeService;
     this.activityLogService  = activityLogService;
 }
Пример #9
0
        public ConceptServiceTest()
        {
            ConceptMediaRepository = A.Fake <IConceptMediaRepository>();
            ConceptRepository      = A.Fake <IConceptRepository>();
            StatusRepository       = A.Fake <IStatusRepository>();
            LanguageRepository     = A.Fake <ILanguageRepository>();
            MetadataRepository     = A.Fake <IMetadataRepository>();
            UrlHelper = A.Fake <IUrlHelper>();

            Mapper = AutoMapper.Mapper.Instance;

            Service                 = new ConceptService(ConceptRepository, StatusRepository, ConceptMediaRepository, MetadataRepository, LanguageRepository, Mapper, UrlHelper);
            Mock                    = new Mock.Mock();
            _status                 = new Status();
            BaseListQuery           = BaseListQuery.DefaultValues("nb");
            _language               = new Language();
            _listOfMetaWithLanguage = new List <MetaData> {
                new MetaData
                {
                    Language = _language, Category = new MetaCategory {
                        TypeGroup = new TypeGroup {
                            Name = "language"
                        }
                    }
                }
            };
            _userInfo = new UserInfo
            {
                FullName = "Fullname",
                Email    = "Email"
            };

            A.CallTo(() => StatusRepository.GetById(A <int> ._)).Returns(null);
            A.CallTo(() => MetadataRepository.GetByRangeOfIds(A <List <int> > ._)).Returns(_listOfMetaWithLanguage);
            A.CallTo(() => LanguageRepository.GetByAbbreviation(A <string> ._)).Returns(_language);
        }
Пример #10
0
 public AddConceptService(IConceptRepository conceptRepository)
 {
     _conceptRepository = conceptRepository;
 }
Пример #11
0
 public CreateCommandHandler(IConceptRepository conceptRepository) =>
 public AddConceptCommandHandler(IConceptRepository conceptRepository)
 {
     _conceptRepository = conceptRepository;
 }
Пример #13
0
 public RenameConceptCommandHandler(IConceptRepository conceptRepository)
 {
     _conceptRepository = conceptRepository;
 }
Пример #14
0
 public DeleteCommandHandler(IConceptRepository conceptRepository) =>
 public QuestionRepository(ILiveSetting liveSetting, IConceptRepository conceptRepository) : base(liveSetting)
 {
     _conceptRepository = conceptRepository;
 }
Пример #16
0
 public void SetUp()
 {
     _liveSetting       = new LiveSetting(_database.DatabasePath);
     _conceptRepository = new ConceptRepository(_liveSetting, new CategoryRepository(_liveSetting));
 }
Пример #17
0
 public ConceptsQuery(IConceptRepository repository)
 {
     this.repository = repository;
 }
Пример #18
0
 public override void OncePerTest()
 {
     this.mockContext = new Mock<ITbiContext>();
     this.sut = new ConceptRepository(this.mockContext.Object);
 }
Пример #19
0
 public ConceptCreatorService(IConceptRepository conceptRepository, IUnitOfWork unitOfWork)
 {
     this.conceptRepository = conceptRepository;
     this.unitOfWork        = unitOfWork;
 }
Пример #20
0
 public RenameConceptService(IConceptRepository conceptRepository)
 {
     _conceptRepository = conceptRepository;
 }
Пример #21
0
 public ConceptDeleteService(IConceptRepository conceptRepository, IGameRepository gameRepository, IUnitOfWork unitOfWork)
 {
     this.conceptRepository = conceptRepository;
     this.gameRepository    = gameRepository;
     this.unitOfWork        = unitOfWork;
 }
Пример #22
0
 public GameCreatorService(IGameRepository gameRepository, IConceptRepository conceptsRepository, IUnitOfWork unitOfWork)
 {
     this.gameRepository     = gameRepository;
     this.conceptsRepository = conceptsRepository;
     this.unitOfWork         = unitOfWork;
 }
Пример #23
0
 public ConceptService(IConceptRepository repo)
 {
     _conceptRepository = repo;
 }