示例#1
0
        public void GetThreadShouldReturnThreadWithCorrectTask()
        {
            SqlTaskFactory sqlTaskFactory = new SqlTaskFactory();
            ITask          sqlBackUpTask  = sqlTaskFactory.GetSqlBackupDbTask(this.connectionString, this.path);

            Thread thread = this.taskManager.GetThread(sqlBackUpTask);

            Assert.AreEqual(thread.Name, "Task manager thread #1");
        }
示例#2
0
        public static TaskListViewModel Create()
        {
            string connectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
            var    provider         = new DatabaseConnectionProvider(connectionString);

            ITaskFactory    taskFactory    = new SqlTaskFactory(provider);
            ITaskRepository taskRepository = new SqlTaskRepository(provider);

            return(new TaskListViewModel(taskFactory, taskRepository));
        }
 public void Init()
 {
     this.sqlTaskFactory   = new SqlTaskFactory();
     this.connectionString = string.Format("Data Source=.;Initial Catalog={0};Integrated Security=True;", this.databaseName);
 }