//------------------------------------------------------------- // 概要:指定URLから取得した掲示板名と想定結果を確認 //------------------------------------------------------------- private void CheckBbsName(string url, string bbsName) { BbsStrategy strategy = BbsStrategyFactory.Create(url); strategy.UpdateBbsName(); Assert.AreEqual(bbsName, strategy.BbsInfo.BbsName); }
//------------------------------------------------------------- // 概要:コンストラクタ //------------------------------------------------------------- public OperationBbs() { // スレッドURL変更 changeUrlWorker.WorkerSupportsCancellation = true; // キャンセル処理を許可 changeUrlWorker.DoWork += (sender, e) => { string url = (string)e.Argument; strategy = BbsStrategyFactory.Create(url); strategy.UpdateBbsSetting(); strategy.UpdateThreadList(); strategy.UpdateBbsName(); }; changeUrlWorker.RunWorkerCompleted += (sender, e) => { Logger.Instance.Debug("RaiseThreadListChange"); ThreadListChange(this, new EventArgs()); }; // スレッド一覧更新 updateThreadListWorker.WorkerSupportsCancellation = true; updateThreadListWorker.DoWork += (sender, e) => { strategy.UpdateBbsSetting(); strategy.UpdateThreadList(); }; updateThreadListWorker.RunWorkerCompleted += (sender, e) => { Logger.Instance.Debug("RaiseThreadListChange"); ThreadListChange(this, new EventArgs()); }; }