示例#1
0
        public static void Initialize(TestContext context)
        {
            // YmmOperation 作成
            YmmOperation = new YmmOperation();

            // 一度 Update を走らせる
            YmmOperation.Update();

            // 操作可能状態でなければ不可
            if (!YmmOperation.CanOperate)
            {
                Assert.Inconclusive(
                    YmmOperation.IsAlive ?
                    @"ゆっくりMovieMakerをアイドル状態にしてください。" :
                    @"ゆっくりMovieMakerを起動してください。");
            }

            // タイムラインウィンドウ非表示なら表示試行
            if (!YmmOperation.IsTimelineVisible)
            {
                var r = YmmOperation.SetTimelineVisible(true);
                if (!r.Value)
                {
                    Assert.Inconclusive(r.Message);
                }
            }

            // 実行ファイルパスを取得する
            var(filePath, filePathMessage) = YmmOperation.GetProcessFilePath();
            if (filePath == null)
            {
                Assert.Inconclusive(@"実行ファイルパスを取得できません。" + filePathMessage);
            }
            YmmProcessFilePath = filePath;

            // 念のためテスト用WAVEファイルの存在チェック
            if (!File.Exists(TestWaveFilePath))
            {
                Assert.Inconclusive(
                    @"テスト用WAVEファイル " +
                    Path.GetFullPath(TestWaveFilePath) +
                    @" が配置されていません。");
            }
        }
示例#2
0
 public static void Cleanup()
 {
     // YmmOperation を破棄
     YmmOperation?.Dispose();
 }