public void EnsureVisible() { listBox.EnsureVisible(99); dynamic item = listBox.Dynamic().ItemContainerGenerator.ContainerFromIndex(99); Assert.IsFalse((bool)app.Type <object>().ReferenceEquals(null, item)); }
public void TestSize() { var selector = new WPFListBox(target); Size size = selector.Dynamic().RenderSize; Assert.AreEqual(new System.Drawing.Size((int)size.Width, (int)size.Height), selector.Size); }
public void TestPointToScreen() { var selector = new WPFListBox(target); Point size = selector.Dynamic().PointToScreen(new Point()); Assert.AreEqual(new System.Drawing.Point((int)size.X, (int)size.Y), selector.PointToScreen(new System.Drawing.Point())); }
public void TestIsEnabled() { var selector = new WPFListBox(target); Assert.IsTrue(selector.IsEnabled); selector.Dynamic().IsEnabled = false; Assert.IsFalse(selector.IsEnabled); }
public void TestVisibility() { var selector = new WPFListBox(target); Assert.AreEqual(Visibility.Visible, selector.Visibility); selector.Dynamic().Visibility = Visibility.Hidden; Assert.AreEqual(Visibility.Hidden, selector.Visibility); }
public void TestIsEnabled() { var win = app.Type(typeof(Application)).Current.MainWindow; var selector = new WPFListBox(target); Assert.IsTrue(selector.IsEnabled); selector.Dynamic().IsEnabled = false; Assert.IsFalse(selector.IsEnabled); }
public void TestVisibility() { var win = app.Type(typeof(Application)).Current.MainWindow; var selector = new WPFListBox(target); Assert.AreEqual(Visibility.Visible, selector.Visibility); selector.Dynamic().Visibility = Visibility.Hidden; Assert.AreEqual(Visibility.Hidden, selector.Visibility); }
public void TestActivate() { var win = new WindowControl(app.Type(typeof(Application)).Current.MainWindow); var newWin = app.Type <Window>()(); newWin.Show(); var selector = new WPFListBox(target); selector.Activate(); Assert.AreEqual(WindowControl.FromZTop(app).Handle, win.Handle); Assert.IsTrue((bool)selector.Dynamic().IsFocused); newWin.Close(); }