public MainWindow()
        {
            var config = new ConfigurationService("testsettings.json");
            var repo   = new SqliteWorkTimeEsRepository(config,
                                                        new MapperConfiguration(opt => opt.AddProfile <DbEventProfile>()).CreateMapper());

            var uow = new WorkTimeUow(repo);

            _workTimeBuildService = new WorkTimeBuildService(repo, new SqliteWorkTimeIdGeneratorService(config));
            var workTime =
                _workTimeBuildService.CreateStartedManually(new User(1, "mpekala"), DateTime.UtcNow.AddMinutes(120));


            workTime.StartManually();

            _alghorithm = new WMonitorAlghorithm(new AlghorithmFaceRecognition(new HcFaceDetection(new ConfigurationService("")), new DnFaceRecognition(), new CaptureService(), new SqliteTestImageRepository(config,
                                                                                                                                                                                                               new MapperConfiguration(opt => opt.AddProfile <DbTestImageProfile>()).CreateMapper())), new WorkTimeEventService(uow, repo, config), config, new MouseKeyboardMonitorService(), new CaptureService());

            _alghorithm.SetWorkTime(workTime);

            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Debug()
                         .WriteTo.Console()
                         .CreateLogger();

            InitializeComponent();
        }
Exemple #2
0
        public WorkTimeEventServiceTests()
        {
            var repo  = CreateRepo();
            var idGen = CreateIdGen();

            _service      = new WorkTimeEventService(new WorkTimeUow(repo), repo, TestUtils.ConfigurationService);
            _buildService = new WorkTimeBuildService(repo, idGen);
            _repository   = repo;
        }
Exemple #3
0
 public WorkTimeBuildServiceTests()
 {
     _idGenerator = CreateGenService();
     _repository  = CreateRepo();
     _service     = new WorkTimeBuildService(_repository, _idGenerator);
 }