Esempio n. 1
0
        public ConvertImage_AcceptanceTest()
        {
            _container = CreateDIContainer();
            _dbContext = _container.Resolve <ImageEditAppContext>();
            var editTaskProgressRepository = _container.Resolve <IImgTaskProgressRepository>();
            var editTaskResultRepository   = _container.Resolve <IImgTaskResultRepository>();
            var imgRepository = new ImgRepository(_dbContext, _container.Resolve <IMapper>());
            var mqService     = _container.Resolve <IMessageQueueService>();

            _editTaskService          = new ImgTaskService(imgRepository, mqService, editTaskProgressRepository, editTaskResultRepository);
            _imgTaskProgressService   = new ImgTaskProgressService(editTaskProgressRepository);
            _editImgTaskResultService = new ImgTaskResultService(editTaskResultRepository);

            _container.Resolve <IBusControl>().Start(TimeSpan.FromSeconds(20));
        }
Esempio n. 2
0
 public ImgController()
 {
     imgRepository = new ImgRepository();
 }