Пример #1
0
 public TodosController(ChromiumWebBrowser originalBrowser, MainWindow mainForm, DataContext dbContext) : base(originalBrowser, mainForm)
 {
     _goalsProvider      = new GoalsProvider(dbContext);
     _activitiesProvider = new ActivitiesProvider(dbContext);
     _todoItemsProvider  = new TodoItemsProvider(dbContext);
     _tagsProvider       = new TagsProvider(dbContext);
 }
Пример #2
0
        public ReportsController()
        {
            var dbContext = new DataContext();

            _todoItemsProvider = new TodoItemsProvider(dbContext, UserId);
            _tagsProvider      = new TagsProvider(dbContext);
            _goalsProvider     = new GoalsProvider(dbContext, UserId);
        }
Пример #3
0
 public GoalsController()
 {
     _dbContext         = new DataContext();
     _goalsProvider     = new GoalsProvider(_dbContext, UserId);
     _acivitiesProvider = new ActivitiesProvider(_dbContext, UserId);
     _todoItemsProvider = new TodoItemsProvider(_dbContext, UserId);
     _usersProvider     = new UsersProvider(_dbContext);
 }
Пример #4
0
        public TasksController()
        {
            var dbContext = new DataContext();

            _goalsProvider      = new GoalsProvider(dbContext, UserId);
            _activitiesProvider = new ActivitiesProvider(dbContext, UserId);
            _todoItemsProvider  = new TodoItemsProvider(dbContext, UserId);
            _tagsProvider       = new TagsProvider(dbContext);
        }
Пример #5
0
        public void Initialize()
        {
            var mockDbContext = new Mock <DataContext>();

            mockDbSet = new Mock <DbSet <Goal> >();
            mockDbContext.Setup(m => m.Goals).Returns(mockDbSet.Object);
            mockDbContext.Setup(c => c.Set <Goal>()).Returns(mockDbSet.Object);

            mockDbProvider = new GoalsProvider(mockDbContext.Object);
        }
Пример #6
0
 public void Setup(DataContext dbContext)
 {
     _goalsProvider     = new GoalsProvider(dbContext);
     _acivitiesProvider = new ActivitiesProvider(dbContext);
     _todoItemsProvider = new TodoItemsProvider(dbContext);
 }