コード例 #1
0
 public void ThenImageIsNotChanged_()
 {
     AssertionUtil.AssertTrue(
         ImageUtil.ImageCompareString(
             (Bitmap)ScenarioContext.Current["initialImage"],
             new Bitmap(Image.FromFile(Path.Combine((string)ScenarioContext.Current["imagePath"])))
             ),
         "Image has changed");
 }
コード例 #2
0
        public void AssertTrialVersionWindowIsOpen(string windowName)
        {
            string window;

            switch (windowName)
            {
            case "Main":
                window = ConfigurationManager.AppSettings["MainWindowName"];
                break;

            case "Trial version welcome":
                window = ConfigurationManager.AppSettings["ModalWindowName"];
                break;

            default:
                window = windowName;
                break;
            }
            var isWindowOpen = WaitUtil.WaitForCondition(() => WindowBl.IsDefaultWindowOpen(window));

            AssertionUtil.AssertTrue(isWindowOpen, $"{windowName} is not open");
        }
コード例 #3
0
 public void AssertWarningWindowIsOpen()
 {
     AssertionUtil.AssertTrue(WindowBl.IsDefaultWindowCurrentlyActive(ConfigurationManager.AppSettings["ModalWindowName"]), "Modal window is not active");
     AssertionUtil.AssertNotNull(MainView.LabelNoFilesSelected(
                                     Scope.DefaultWindow.ModalWindow(ConfigurationManager.AppSettings["ModalWindowName"])), "No label found");
 }
コード例 #4
0
 public void AssertSearchWindowIsClosed()
 {
     AssertionUtil.AssertTrue(FindFilesView.FindFilesWindow.IsClosed, "Search window is not closed");
 }
コード例 #5
0
 public void ThenConfirmationWindowIsOpen()
 {
     AssertionUtil.AssertTrue(WindowBl.IsDefaultWindowCurrentlyActive(
                                  ConfigurationManager.AppSettings["ModalWindowName"]), "Modal window is not active");
 }
コード例 #6
0
        public void AssertAppIsClosed()
        {
            var hasExited = WaitUtil.WaitForCondition(() => Scope.Application.Application.HasExited);

            AssertionUtil.AssertTrue(hasExited, "App is not stopped yet");
        }
コード例 #7
0
 public void AssertSidePanelIsOpen()
 {
     AssertionUtil.AssertTrue(MainView.ListBoxSidePanel.IsVisible(), "Side panel is not visible");
 }
コード例 #8
0
 public void AssertItemIsPresentOnPanel(string filename, string panel)
 {
     AssertionUtil.AssertTrue(PanelBl.IsFileFound(panel, filename), "File is not present when should be");
 }