public ImportLogic(IUnitOfWork unitOfWork, IConfiguration configuration, IAreaLogic areaLogic, ITopicLogic topicLogic, ITypeReqLogic typeLogic) { this.unitOfWork = unitOfWork; this.areaRepository = unitOfWork.AreaRepository; this.topicRepository = unitOfWork.TopicRepository; this.typeRepository = unitOfWork.TypeReqRepository; this.configuration = configuration; this.areaLogic = areaLogic; this.topicLogic = topicLogic; this.typeLogic = typeLogic; }
public void TestInitialize() { area = new AreaEntity { Id = 1, Name = "Limpieza", Topics = new List <TopicEntity>() }; topic = new TopicEntity { Id = 1, Name = "Contenedores de basura", AreaEntityId = 1, RequestTypes = new List <TypeReqEntity>() }; type = new TypeReqEntity { Id = 1, Name = "Roto", AdditionalFields = new List <AdditionalFieldEntity>(), TopicEntityId = 1 }; unitOfWork = new Mock <IUnitOfWork>(); areaRepository = new Mock <IRepository <AreaEntity> >(); topicRepository = new Mock <IRepository <TopicEntity> >(); typeRepository = new Mock <IRepository <TypeReqEntity> >(); unitOfWork.Setup(u => u.AreaRepository).Returns(areaRepository.Object); unitOfWork.Setup(u => u.TopicRepository).Returns(topicRepository.Object); unitOfWork.Setup(u => u.TypeReqRepository).Returns(typeRepository.Object); var configuration = new Mock <IConfiguration>(); configuration.Setup(c => c["DataImport:Path"]).Returns(".\\Assemblies\\DataImport"); areaLogic = new AreaLogic(unitOfWork.Object); topicLogic = new TopicLogic(unitOfWork.Object); typeLogic = new TypeReqLogic(unitOfWork.Object); importLogic = new ImportLogic(unitOfWork.Object, configuration.Object, areaLogic, topicLogic, typeLogic); }
public TopicController(ITopicLogic topicLogic) { this._topicLogic = topicLogic; }
public TopicsController(ITopicLogic topicLogic) { this.topicLogic = topicLogic; }
public TopicController(ITopicLogic topicLogic, IWebApiMapper apiMapper) { this.mapper = apiMapper.Configure(); this.topicLogic = topicLogic; }