public void Win_EasyTest()
        {
            var winAdapter      = new WinAdapter();
            var testApplication = winAdapter.RunWinApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWinApplication\TestApplication.Win.exe");

            var commandAdapter = winAdapter.CreateCommandAdapter();

            var autoTestCommand = new AutoTestCommand();

            autoTestCommand.Execute(commandAdapter);

            winAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
        }
Exemple #2
0
 public void Win_EasyTest()
 {
     using (var winAdapter = new WinAdapter()){
         var testApplication = winAdapter.RunWinApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWinApplication\TestApplication.Win.exe");
         try{
             var commandAdapter  = winAdapter.CreateCommandAdapter();
             var autoTestCommand = new AutoTestCommand();
             autoTestCommand.Execute(commandAdapter);
         }
         catch (Exception e) {
             Console.WriteLine(e);
             throw;
         }
         finally{
             winAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
         }
     }
 }
 public async Task Win_EasyTest()
 {
     using (var winAdapter = new WinAdapter()){
         var testApplication = winAdapter.RunWinApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWinApplication\TestApplication.Win.exe");
         try{
             var commandAdapter = winAdapter.CreateCommandAdapter();
             commandAdapter.Execute(new LoginCommand());
             await commandAdapter.TestMicrosoftService(() => Observable.Start(() => {
                 var autoTestCommand = new AutoTestCommand();
                 autoTestCommand.Execute(commandAdapter);
                 commandAdapter.TestMicrosoftTodoService();
             }));
         }
         finally{
             winAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
         }
     }
 }