コード例 #1
0
ファイル: WorkSessionTest.cs プロジェクト: EricBlack/White
 public void ShouldSaveWindowInformationInFile()
 {
     File.Delete("foo.xml");
     using (WorkSession workSession = WorkSession())
     {
         Application application = new WinformsTestConfiguration().LaunchApplication();
         workSession.Attach(application);
         Window window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo"));
         window.Get<Button>("ButtonWithTooltip");
     }
     Assert.True(File.Exists("foo.xml"));
 }
コード例 #2
0
ファイル: WorkSessionTest.cs プロジェクト: EricBlack/White
 public void ShouldFindControlBasedLocation()
 {
     File.Delete("foo.xml");
     using (WorkSession workSession = WorkSession())
     {
         Application application = new WinformsTestConfiguration().LaunchApplication();
         workSession.Attach(application);
         Window window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo"));
         window.Get<Button>("ButtonWithTooltip");
     }
     using (WorkSession workSession = WorkSession())
     {
         Application application = new WinformsTestConfiguration().LaunchApplication();
         workSession.Attach(application);
         Window window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo"));
         window.Get<Button>("ButtonWithTooltip");
     }
 }